by jfisch
12. August 2009 05:47
I've always been frustrated when having retrieved a Visual Studio project that's read only. So, today I decided to fix the problem once and for all and create a simple batch file that clears the RO flags necessary to successfully build. I know I'm not the only one who's experienced this, so here you go. Let me know if I've over looked any file extensions and I'll add to the list. Just stick the contents below (or download the file below) into a batch file and execute it at the command prompt like the provded example.
attrib -r /s %1*.exe
attrib -r /s %1*.exe.manifest
attrib -r /s %1*.dll
attrib -r /s %1*.pdb
attrib -r /s %1*.xml
attrib -r /s %1*.resources
attrib -r /s %1*.FileListAbsolute.txt
attrib -r /s %1*.txt
attrib -r /s %1*.cache
FOR /F "eol=; tokens=* delims=, " %%i in ('dir/b/s/ad %1*Debug') do attrib -r -h /s %%i\*.*
Example execution: Buildable.bat C:\Temp\BrokenBuild\
Buildable.bat (325.00 bytes)
HTH,
Jeff