DOS: Commands

If a directory does not exist, do something:

[ -d "output/directory" ] || call dosomething.bat

If a file does not exist, do something:

[ -f "output/directory/file.name" ] || call dosomething.bat

Using DOS to clean solutions:

SET DEVENV="C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\IDE\devenv.exe"
%DEVENV% "dir\to\SolutionName.sln" /clean "ConfigurationName|Win32" /project "ProjectName"

Using DOS to build solutions:

SET DEVENV="C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\IDE\devenv.exe"
%DEVENV% "dir\to\SolutionName.sln" /build "ConfigurationName|Win32" /project "ProjectName"

No comments: