Andrew
Member
Registered: 5th May 04
Location: Skoda Octavia Estate, Ford Puma
User status: Offline
|
Writting a batch file to mirror my website to my hard drive.
How do i keep the MS Dos window open so i can see the errors?
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Can't you get it to write to a log file?
Stab in the dark there, not overly clued up on batch files.
|
Andrew
Member
Registered: 5th May 04
Location: Skoda Octavia Estate, Ford Puma
User status: Offline
|
My supervisor tells me to use MS Dos. She's the boss so i'm gonna use that
I pretty much know how to do it, just the .bat file closes after it has done the job and i want it to stay open so i can see everything in there.
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Ok well if it helps I found this code
:remote
at \\%Node% %ti% /interactive "%LO%"
goto errorlevel
echo Job completed: %node% >> c:\logs\batch.log
goto :EOF
:1
echo Job Failed: %node% >> c:\logs\batch.log
goto :EOF
That makes the batch file write to the path above.
[Edited on 09-12-2006 by James]
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
how do you mean?
surely you can just type cmd at the run command and run the batch file from dos that way?
|
Andrew
Member
Registered: 5th May 04
Location: Skoda Octavia Estate, Ford Puma
User status: Offline
|
yeah u can steve. but you can also type it out in notepad and then save the file as a .bat. when run, it then runs those commands. but the window closes straight after unlike if you manually type the commend into the dos prompt
|
Andrew
Member
Registered: 5th May 04
Location: Skoda Octavia Estate, Ford Puma
User status: Offline
|
My MS Dos For Dummies book has nothing in there *Results to searching the internet*
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
run the batch file from the command prompt?
|
Andrew
Member
Registered: 5th May 04
Location: Skoda Octavia Estate, Ford Puma
User status: Offline
|
found it
you just type in pause at the end of the command.
|
Sam
Moderator Premium Member
Registered: 24th Dec 99
Location: West Midlands
User status: Offline
|
Isn't there an option called "Close on exit" that you have to keep unticked on the command prompt window?
|