Wednesday, December 5, 2012

make a .bat file

Following this I made a .bat file by putting the following in a .txt file:

@echo off
echo Comparing two files: %1 with %2
   
if not exist %1 goto File1NotFound
if not exist %2 goto File2NotFound
   
fc %1 %2
if %ERRORLEVEL%==0 GOTO NoCopy
   
echo Files are not the same. Copying %1 over %2
copy %1 %2 /y & goto END
   
:NoCopy
echo Files are the same. Did nothing
goto END
   
:File1NotFound
echo %1 not found.
goto END
   
:File2NotFound
copy %1 %2 /y
goto END
   
:END
echo Done.

 
 

I then just renamed the .txt to .bat.

C:\Windows\Microsoft.NET\Framework64\v4.0.30319 is where msbuild seemed to end up installed from after I downloaded msbuild from here.

msbuild FooFoo.sln /p:Configuration=Deploy is the command for making a Deploy-specific Web.config.

No comments:

Post a Comment