Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
born2achieve
- Posts: 51
- Joined: 16 Nov 2014 20:28
#1
Post
by born2achieve » 05 Mar 2015 20:22
Hey Guys,
I have 3 DOS scripts that has to be merged into one .bat file . Basically i am trying to clean the temp files and getting the svn update and compiling and publishing the .net webapplication. below are my individual scripts.
to clean the file :
Code: Select all
@echo off
echo *** Deleting ASP.NET temporary files (.NET 4.0)... ***
echo Deleting 32-bit files...
rmdir "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root" /Q /S
echo Deleting 64-bit files...
rmdir "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root" /Q /S
pause
to get svn update :
Code: Select all
@echo off
cls
echo == Initiating system instance variables...
echo. -- Setting the variables...
:: Here you need to make some changes to suit your system.
set SOURCE=D:\Nutrition_Build\Trunk
set SVN=C:\Program Files\TortoiseSVN\bin
:: Unless you want to modify the script, this is enough.
echo. %SOURCE%
echo. %SVN%
echo. ++ Done setting variables.
echo.
echo == Updating source from SVN
echo. -- Running update...
"%SVN%\TortoiseProc.exe" /command:update /path:"%SOURCE%" /closeonend:2
echo. ++ Done.
echo. -- Cleaning up...
set SOURCE=
set SVN=
echo. ++ Done.
To compile and publish:
Code: Select all
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_compiler.exe -v / -p "E:\Sample\Myproject\Src" -u -f E:\BuildOutput\
Please help me on merging this three scripts into one file.
thanks.
-
Squashman
- Expert
- Posts: 4465
- Joined: 23 Dec 2011 13:59
#2
Post
by Squashman » 05 Mar 2015 20:26
Copy and paste into one file???
I guess I am not sure if this is some trick question.
-
born2achieve
- Posts: 51
- Joined: 16 Nov 2014 20:28
#3
Post
by born2achieve » 05 Mar 2015 20:39
Hi Squashman, i did try that already. the last scripts throws an error. below the error:
'"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_compiler.exe -v / -p "E:\Sample\Myproject\Src" -u -f E:\BuildOutput\"' is not recognized as an internal or external command,
if i copy and execute straightway on command prompt it's working
Any suggestion please
-
Squashman
- Expert
- Posts: 4465
- Joined: 23 Dec 2011 13:59
#4
Post
by Squashman » 05 Mar 2015 22:01
Weird that it outputs the error with Single and Double quotes around it.
-
Squashman
- Expert
- Posts: 4465
- Joined: 23 Dec 2011 13:59
#5
Post
by Squashman » 05 Mar 2015 22:06
The double quotes are in your batch file aren't they! Because you have the whole thing quoted it thinks it is one big long command.
I can replicate that error.
Code: Select all
C:\Users\Squashman>"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_compiler.exe -v / -p "E:\Sample\Myproject\Src" -u -f E:\BuildOutput\"
'"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_compiler.exe -v / -p "E:\Sample\Myproject\Src" -u -f E:\BuildOutput\"' is not recognized as an internal or external command, operable program or batch file.