How to separate paths from script

Instead of hard-coding your paths, you can put them in path.txt. Then using “for /f” to go thru each line in path.txt, parse each line and process it.

Why do we do this? it’s because of flexibility. Everyone can have a personalized set of directories he/she wants to compile since it takes too long to compile everything without messing with the script. You can update your script w/0 your path file and vice versa.

Example:

for /f "eol=; tokens=1,2 delims= " %%I in (path.txt) do (
call vs8build %commonPath%%%I%%J.sln %cfg% %commonPath%%logprefix%_%%J.txt %commonPath%%sumlogprefix%_%%J.txt %3)
Advertisements
How to separate paths from script

A build script for MS Visual Studio

MS Visual Studio 2005/2008 command line build utility vcbuild.exe doesn’t show just error projects. Finding them manually is time-consuming so I wrote a script to filter out everything except error projects w/ number of errors. The result will be saved into summary log file.

Download here

A build script for MS Visual Studio