Projects‎ > ‎Cmd && Bash Scripts‎ > ‎

CMD::Quick upload prep for Visual Studio projects

posted Apr 23, 2011, 5:05 PM by Chairman Steve   [ updated Apr 23, 2011, 7:37 PM ]
All this script does is zip the release exe, and bring it to the top. This needs to be in the top level of the project directory. Don't Forget to set the setupdir variable. This is the variable that tells the script where to find the setup file.

requires winrar in the paths environment variable.

@rem prep_uploads.bat
@rem Usage: place inside main Visual Studio project folder. execute.

@rem rar a -afzip -r -p%3 %1\*.*
@echo off
set setupdir=SolSwapSetup
:: retrieving  name of current directory
for %%* in (.) do set MyDir=%%~n*
:: adding safety factor for no directory, i.e a drive
if not defined MyDir set MyDir=%CD:\=%
:: telling you what it is
:: echo the current directory is %MyDir%
cd %MyDir%\%MyDir%\bin\Release
winrar a -afzip "" "%MyDir%.exe"
echo "%~DP0%MyDir%"
copy /B "" "%~DP0"
cd "%~DP0"
copy /B "%~DP0%setupdir%\%setupdir%\release\*.msi" "%~DP0"