Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: DOS command in batch file

05 Mar 2015   #1

windows7 64 bit
DOS command in batch file

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 :
@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

to get svn update :

@echo off

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 == Updating source from SVN
echo. -- Running update...
"%SVN%\TortoiseProc.exe" /command:update /path:"%SOURCE%" /closeonend:2
echo. ++ Done.

echo. -- Cleaning up...
set SVN=
echo. ++ Done.
To compile and publish:
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.


My System SpecsSystem Spec
05 Mar 2015   #2

Windows 10 Pro X64

Looks like you could simply merge them as I don't see any branching being done (no goto).
My System SpecsSystem Spec
05 Mar 2015   #3

windows7 64 bit

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 System SpecsSystem Spec

06 Mar 2015   #4

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan

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.

"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
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 System SpecsSystem Spec

 DOS command in batch file

Thread Tools

Similar help and support threads
Thread Forum
may have a batch file of this command?
each line, which is each command, is seperate, it would normally be typed in cmd, thanks netstop sppvc cd %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform rename tokens.dat cd %windir%\system32 net start sppsvc slui.exe dont know how...
General Discussion
Problem with batch file command to edit registry
reg add HTLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DontDisplayLastUserName /t REG_DWORD 00000001 /f I am trying to hide all users at logon and I know this is where you change it but for some odd reason the syntax is wrong and I can not figure it out. Can someone please...
In Need a batch file command
So, I need a command for batch files, or other things that a batch file can link to, that selects another window, say a text window(notepad) and then can be typed into. I've used the vbs scripting with Set oShell = CreateObject("WScript.Shell") oShell.AppActivate "Window name" ...
General Discussion
Elevated command via batch file?
I've set up a Virtual Router as in this page, but what it doesn't tell you is that you need to re-run the elevated command netsh wlan start hostednetwork every time the computer boots or comes out of standby. Is there a way to run an elevated command via a batch file? Later ... I've just...
Network & Sharing
Batch File - For Command??
<This post has now been solved> Hi, Sorry if this is not the place but does anyone know how to do the following? I am trying to create a batch file to search a directory for a specified file type and list it in a text file then get the batch file to read that text file and copy all the...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 00:20.
Twitter Facebook