title: How do I use this command in a pre build event in Visual Studio
body: <p>I will be concise.</p>
  
  <p>The command <code>FOR /F %i IN (C:\Version.txt) DO @set Version=%i</code> works perfectly fine in <code>cmd.exe</code> to read the text of the file into a variable. but whenever I put that line into a prebuild event in Visual Studio it says <code>Exited with code 255</code>.</p>
  
  <p>On <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx</a> I found that 0xFF / 255 means: <code>The extended attributes are inconsistent.</code>.</p>
  
  <p>How do I use that command in a pre build event?
  Many thanks.</p>