Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Windows XP Home Edition guest and a Linux Mint 13 host. I use VirtualBox and the ~/Public directory is shared with the guest. It sometimes happens that I use IE on the guest system to download files (until I get a better Windows browser).

All of the downloaded files go the the L:\ drive (the ~/Public directory). When they are finished downloading, Windows Explorer adds a :Zone.Identifier file for each file I download. When I extract a downloaded ZIP archive on the guest (on drive L:\), Windows creates a :Zone.Identifier file for every file in the extracted directory. This even occurs if I use the host to move a file to the ~/Public directory.

The shared ~/Public directory is on an ext4 partition and the colon character is supposed to be illegal in file names in Windows, but not on the ext4 partition. Is there any way to stop Windows from putting all this rubbish on my filesystem? (I might have to create a shell script to clean up after Windows' act.)

Here is what I see in Windows Explorer: Rubbish in my Public directory on Windows

By the way, if I were running a Mac OS X host (where colons are illegal file name characters) this would be even more horrendous.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I bet these are used to track where the file came from (for windows to pop up the "are you sure you want to open this" dialog when you try to open a downloaded .zip or .exe).

My memory isn't 100% on this, but if I recall correctly the : is forbidden in Windows filenames because it's used for alternate streams on a file. You have the main data stream which holds the actual content, but each file can have named alternate streams which hold metadata: C:\File\Path\Filename.exe:AlternateStreamName

If the underlying filesystem is EXT4, then I suspect IE/WE is trying to write to such a file and expecting it to be an alternate stream, whereas the filesystem driver for the L:\ drive is just creating it as a regular file.

(By the way, : is not forbidden on NTFS, just the Win32 API that Windows explorer and most applications use (because they repurpose it for alternate streams). NTFS supports any character in a filename except NUL (\0000) or slash (/), and HFS Plus (Mac OS X) supports any character except for NUL (but this might be further restricted by the tools or OS depending on it's needs))


Ansgar Wiechers provided the answer in the comments below:

Creation of ZoneIdentifier streams can be disabled by setting the policy Do not preserve zone information in file attachments to enabled. The policy is located under User Configuration\Administrative Templates\Windows Components\Attachment Manager.

For crippled Windows versions creating a DWORD registry value SaveZoneInformation with value 1 in [HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments] should have the same effect.

share|improve this answer
    
I was going to start using Avant Browser on Windows anyway. By the way, the alternate streams (forks) are also created when I copy a file to the ~/Public on Linux. That means it is not just Internet Explorer's fault for putting all this charabia on my filesystem. I already know that the forbidden characters are in the Win32 API. I still need to know how to disable this so-called 'security' feature. –  Jonathan Reno Oct 1 '12 at 14:33
    
By the way, I thought that the : character can only be used with a drive letter on Windows. Looks like the 'colon-forking' feature is just another Microsoft kludge. –  Jonathan Reno Oct 1 '12 at 14:34
    
Windows Explorer might be creating default zone identifiers when it detects a new file without one, similar to how it does thumbnails. If that's the case, then your best bet is to use an alternative, such as xplorer2 if there's nowhere to turn it off (WE doesn't have an option, but try looking through the IE settings. IE and WE are actually one in the same deep down) –  Darth Android Oct 1 '12 at 14:36
    
I already know that. This is one reason I don't like to use Windows. Why does a trashy browser have to be integrated into Windows so that one cannot remove it without seriously damaging system files? –  Jonathan Reno Oct 1 '12 at 14:40
1  
Creation of ZoneIdentifier streams can be disabled by setting the policy Do not preserve zone information in file attachments to enabled. The policy is located under User Configuration\Administrative Templates\Windows Components\Attachment Manager. For crippled Windows versions creating a DWORD registry value SaveZoneInformation with value 1 in [HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments] should have the same effect. –  Ansgar Wiechers Oct 1 '12 at 22:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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