title: NTFS alternate data streams
body: <p>Today I have seen this weird magic NTFS system supports: each file can have multiple data streams. Basically one could have a file <code>a.txt</code> of 0b size but there can be any number of bytes hidden in a separate data stream for that file. This is strictly NTFS related magic and I don't see any noble reason for having these streams around. You can look for NTFS streams with the help of the <code>streams</code> utility from Sysinternals. This will show you that basically every one of those nasty <code>thumbs.db</code> files comes with an extra data stream.</p>
  
  <p>Okay, now I have seen this magic work on a Windows NT4 system, streams added to files, copied over, deleted (with the help of the aforementioned utility), but I am now trying this at home on my Win XP system, but although I can detect the existing streams, I can't display their contents, can't create new ones, or very much anything when I use the <code>filename:streamname</code> syntax.</p>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>The filename, directory name, or
    volume label syntax is incorrect.</p>
  </blockquote>
  
  <p>Example:
  Output from the streams utility:</p>
  
  <pre><code>c:\DOWNLOADS&gt;streams.exe -s .
  
  Streams v1.56 - Enumerate alternate NTFS data streams
  Copyright (C) 1999-2007 Mark Russinovich
  Sysinternals - www.sysinternals.com
  
  c:\DOWNLOADS\1013.pdf:
     :Zone.Identifier:$DATA       46
  
  c:\DOWNLOADS&gt;type 1013.pdf:Zone.Identifier
  The filename, directory name, or volume label syntax is incorrect.
  </code></pre>
  
  <p>Why can't I display the contents of the alternate data stream?</p>
  
  <p>Looking at the Microsoft documentation on "<a href="http://support.microsoft.com/kb/105763/en-us?FR=1&amp;PA=1&amp;SD=HSCH" rel="noreferrer">How To Use NTFS Alternate Data Streams</a>", I can see that this applies to my operating system, although they do mention that these streams will not be supported in the future. Anyone can shed any light on this?</p>