DOS command in batch file

born2achieve

New member
Local time
12:37 PM
Messages
36
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:
@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:
@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:
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.
 

My Computer

Computer type
PC/Desktop
OS
windows7 64 bit
Looks like you could simply merge them as I don't see any branching being done (no goto).
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Hey Ztruker,

I did try that. but i am getting error on last script.
'"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
 

My Computer

Computer type
PC/Desktop
OS
windows7 64 bit
Hi guys,

Born2achieve, just as Ztruker notes, the scripts are very linear. So you should be able to merge the three parts into one by simply copy pasting each part one after the other into one batch file.


Also, I notice the command displayed in the above post's error message is not the same as the last script listed in post 1.

Code:
"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_compiler.exe -v / -p "E:\Sample\Myproject\Src" -u -f E:\BuildOutput\"
is not the same as​
Code:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_compiler.exe -v / -p "E:\Sample\Myproject\Src" -u -f E:\BuildOutput\
There is an extra pair of quotes in the former (effect of this is that the entire line is treated as a single path to a command; the supposed arguments are actually part of the path/command name).

The ladder is correct.
 

My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
Back
Top