How does Windows know if a file was downloaded from the Internet? - windows

If I open a file in Windows, that was downloaded by chrome or another browser Windows popups a warning, that this file is downloaded from the internet. The same for documents you open in Microsoft Word.
But how does windows know that this file originate from the Internet? I think it's the same file as every other file on my hard drive. Has it to do something with the file properties?

Harry Johnston got it!
Had nothing to do with temporary folder or media cache. It's a NTFS Stream.
For further reading: MSDN File Streams
This blocking information is archieved with the following commands on the CLI:
(echo [ZoneTransfer]
More? echo ZoneId=3) > test.docx:Zone.Identifier
This creates an alternative file stream.

When you download any file from internet. It first downloaded in Media Cache instead of temp folder. Only after that it moves to actual location where you select to save that file.
If you copy and paste some file then it move that file through Temp folder only. Before opening any file windows check the location and if it is Media Folder then you get the error "File is downloading or other errors related to this".

Related

Windows Batch Compressed file is Invalid

I have a batch file that compresses files into a zip folder so I can email the file. The file runs with no issues. However, when I try to open the zip folder, I get the following error:
'Folder is invalid'
and it won't open. Below is the part of the step that compresses the file on Windows Server 2012:
COMPRESS "%DIR_IP_INTERFACES%\SP_Backups\Outbound_GDC_Req.txt" "%DIR_IP_INTERFACES%\SP_Backups\Outbound_GDC_Req_%DATE:/=%_%TIME::=%.zip"
I need it to zip during the batch file, but I will not be the one unzipping. So, I was looking for a standard way to allow anybody to open/unzip the folder when they receive the email (that doesn't require multiple downloads/changes on each computer that might open these files).
Any ideas?

Mac cannot copy because file is in use

I have a external hard drive with NTFS format, I used my Mac to copied zip file in to there with size is about 23Gb.
However, when I bring it back to Mac, when transfer almost complete, the message alert with content: "cannot copy because file is in use", then copy process cancel.
Although I already installed paragon NTFS but still get that message.
I also try to copy using terminal by following command: cp -r /Volumn/source /destination.
Please help me solve this. The data on zip file is very important to me. Thanks

Where does it create the 7zip compressed files

I am using "7-zip 9.20" on "Windows 7".
If I compress a file in my "C" drive (ex: c:\myFolder ), using 7-zip, the output will be creating somewhere else. At this time, I cant find it even with a windows file search.
Does anyone know, where the default location and how can I change it...?
Finally I found the default location. This may be useful for some other as well.
C:\Users{user_name}\AppData\Local\VirtualStore
For anyone with this issue still using Windows 7, but updated to 7-Zip version of 16.04.
If you select the folder to archive >> Tools >> Options >> Folders tab, it will show the options for the Working Folder: System temp folder, current, or Specified, the last of which allows you to designate a path directory for every time you compress the file.
I thought the default was to the folder containing the files you try to archive.
When you select "Add to archive" there is a ... button beside the Archive name, where you can browse to the location you require.

Retrieve zip file from a predefined ftp link using bat or cmd file

I have a pre-defined ftp link with a zip file on the other end that I want to save to a directory on my cloud server (running Windows Server 2008). Once the zip file has been saved to a specified directory, lets say "c:\MyZipFiles\ZipFile-1.zip" for example, I want to unzip the file so that all files contained within the zip file are accessible within the same directory. I'm currently doing this manually and I want to automate this process by creating a .bat or .cmd file that will perform these steps for me.
Once the zip file is unzipped, I have a task in the Task Scheduler of Windows Server Manager ready to use the unzipped files for other things.
The pre-defined link looks something like this:
ftp://idx.realtor.com/idx_download/files.zip
I would greatly appreciate anyone who can help me with this...
Batch file
ftp -s:ftp_cmds.txt host-name-goes-here
unzip local-file.zip
exit
ftp_cmds.txt
username-goes-here
password-goes-here
cd remote-directory-goes-here
get files.zip local-file-name-goes-here.zip
quit
This the batch file uses "unzip" to unzip the archive you can find it here: http://gnuwin32.sourceforge.net/packages/unzip.htm
Either put the binaries in the same directory or put them somewhere else and set your windows PATH
I used my own ftp to test most of this. Your ftp was offline for me, so it might take some tweaking but this should put you in the right direction.

How to find parent ZIP file from arguments when double-clicking in Windows Explorer - .NET 4.0

In Windows Explorer, when you open a ZIP file and double-click a file, say a JPEG file (.jpg), Windows extracts the JPEG file to a temporary folder, and passes the temporary file name to the associated program as the one and only argument, such as "C:\Users\jprice\AppData\Local\Temp\Temp1_<>.zip\<>.jpg"
I noticed that some applications, like the Windows Photo Viewer in Windows 7 know what ZIP file the temporary file came from. You can click next and previous and get the next/previous files from the ZIP file (as you do, they are also extracted to temporary files).
I've googled and prowled through system.io.packaging, but I can't figure out how to get the path of the original ZIP file (the file name is part of the temporary file path).
It's not done with the shell-->open command, Windows Photo Viewer only gets the temporary file name as far as I can tell.
The Photo Viewer command line is
%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %1
Which doesn't help. I did use ProcessMon to watch Photo Viewer and saw it read the .zip file (probably using zipfldr.dll) but could not discover how it knew where the original zip file was.
When I try it, I notice that WinZip initializes the spawned process's current working directory to the folder that the .zip resides in. If you can extract the .zip filename from the temp file path (and older OS versions did not do that), then you can reconstruct the original .zip file path.

Resources