8

In Mac OS X, there is a very useful file property called "Where from" which tells you the URL that the file was downloaded from, available via the "Get Info" context menu within the "More Info" section, as seen below:

enter image description here

My question is this: Can this information be accessed in Windows?

I've never seen that kind of information displayed anywhere before so I would assume the answer to be no and put it down to either a limitation of Windows or its file systems BUT every now and again I open a file and get the following warning:

enter image description here

So, Windows is obviously aware that the file has been downloaded from the Internet somehow - whether that be simply via a fileDownloadedFromInternet: true flag or something I don't know but it's enough for me to ask.

  • 1
    The information whether a file came from the Internet is saved using a NTFS feature called "Alternate Data Stream" (ADS): en.wikipedia.org/wiki/NTFS#Alternate_data_streams_.28ADS.29 – ComFreek Jan 1 '14 at 1:40
  • If you haven't deleted the file from Internet Explorer you can open up your downloads, right click on something you downloaded, and go to the webpage you downloaded the file from or get the link to the download – cutrightjm Jan 1 '14 at 1:41
  • As stated by both previous comments, there is no such feature in Windows, right of the box. Your best bet on Windows is to resort to the browsers' history files. – Doktoro Reichard Jan 1 '14 at 2:01
8

Your computer is able to tell that the file was downloaded from the Internet using ADS, or Alternate Data Streams, a feature of the NTFS file system. Being an NTFS feature, if the item in question is transferred to another file system, such as FAT on a USB, the ADS will be lost. In the case of files downloaded from the internet, an ADS extension is added on to the file that identifies that file from coming from a "zone" of Internet - where a zone is defined (in Internet Explorer, at least) in Internet Options -> Security. Different zones mean the files come from different places (see here).

To see where an ADS is located, you use the Dir /R command, which has an output similar to this:

 Directory of C:\Users\Jacob\Downloads

12/31/2013  09:19 PM    <DIR>          .
12/31/2013  09:19 PM    <DIR>          ..
12/31/2013  09:19 PM                 0 ads.txt
12/31/2013  09:03 PM           502,784 kitty_portable.exe
                                    26 kitty_portable.exe:Zone.Identifier:$DATA
12/31/2013  09:09 PM    <DIR>          others
               2 File(s)        502,784 bytes
               3 Dir(s)  41,975,984,128 bytes free

According to the link above, the contents of the ADS stream go something like this for a file downloaded from the Internet, where the zone is the one specified by your browser. You can view what is in the ADS by running notepad kitty_portable.exe:Zone.Identifier, in my case:

[ZoneTransfer]
ZoneId=3

As seen on this site there are six Zone Transfer IDs, with 3 being Internet Zone as seen above.

Now, when you try to open a file that has that ZoneID set, you are met with an annoying prompt like the one you mentioned. There is a way to remove it, however, by right-clicking on the file, going to Properties, and clicking "Unblock" at the bottom:

enter image description here

What this does is removes the ADS that is appended to the file, which no longer makes your computer worry about opening it. This removal of the ADS can be verified by doing Dir /R in the same directory. You will see that the ADS is now gone:

 Directory of C:\Users\Jacob\Downloads

12/31/2013  10:32 PM    <DIR>          .
12/31/2013  10:32 PM    <DIR>          ..
12/31/2013  10:31 PM           502,784 kitty_portable.exe
12/31/2013  10:32 PM                 0 output.txt
               2 File(s)        502,784 bytes
               2 Dir(s)  41,850,904,576 bytes free

All gone! Basically, as soon as you clear out the downloads in Internet Explorer (or another browser), Windows has no idea what website the file came from, just that it came from the Internet. If the file had a location associated with it, it would most likely have been saved in the ADS.

  • Firefox automatically deletes all my history (downloads, cookies, the lot) when I close it. When I tried this, I got several hundred lines of unicode. So, does this not work if the browser doesn't save the downloads? – Ryan Krage Nov 17 '15 at 9:49
  • Actually, if your file was downloaded by Chrome, the download and referrer URLs are saved in the ADS data, as HostUrl and ReferrerUrl. – Oasis Feng Nov 16 '18 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.