title: Batch file detect if NTFS alternate stream can be written to
body: <h2>Background</h2>
  
  <p>In Windows 7, when a file is downloaded from the internet, some browsers (e.g. IE and Firefox) flag it as coming from the internet. This is apparent in the properties dialog of the file, which will show a message and an "Unblock" button at the bottom of the properties window.</p>
  
  <p>This property is stored as an alternate stream on the NTFS filesystem - specifically, a stream named "Zone.Identifier". So on a blocked file, you can run the command <code>more &lt; file.exe:Zone.Identifier</code> and you get the output:</p>
  
  <pre><code>[ZoneTransfer]
  ZoneId=3
  </code></pre>
  
  <p>You can clear this data with the command <code>echo. &gt; file.exe:Zone.Identifier</code>. This overwrites the above data with simply a blank line, and while the <code>Zone.Identifier</code> stream still exists on the file, the file is no longer "blocked" as confirmed by the properties dialog.</p>
  
  <h2>Problem</h2>
  
  <p>FAT32 file systems obviously don't have NTFS alternate streams; so, the command <code>echo. &gt; file.exe:Zone.Identifier</code> gives the output:</p>
  
  <pre><code>The filename, directory name, or volume label syntax is incorrect.
  </code></pre>
  
  <p>This is output to stdout, so adding 2>NUL on the end does not suppress it. Adding 1>NUL to the end DOES suppress it, however it also suppresses the command from doing anything useful; that is, if you run <code>echo. &gt; file.exe:Zone.Identifier 1&gt;NUL</code>, the <code>Zone.Identifier</code> stream remains.</p>
  
  <p><strong>How can I run the command <code>echo. &gt; file.exe:Zone.Identifier</code> successfully on NTFS, and suppress its error output on FAT32?</strong></p>