Page 1 of 1

Batch file not completing

Posted: 27 Aug 2010 04:24
by matchew
Hello,

Im running the follow batch file to backup a database for our AV console, then moving it to a server.

E:
cd E:\Sophos\Enterprise Console\DB
BackupDB E:\SECBackups\SOPHO.bak
MOVE /Y E:\SECBackups\SOPHO.bak \\server1\IT\Riston_backup

Now the backup completes yet it doesnt do the moving part.

If i run each command manually it all works ok. So why is the batch file stoping after the backupdb?

Re: Batch file not completing

Posted: 28 Aug 2010 05:25
by alan_b
Try inserting above the MOVE the command
PAUSE

If that works then your command BackupDB failed to complete execution before the script ran through to the MOVE, and there was nothing available to be moved until after the script ended.
A cure in that situation could be
START /WAIT BackupDB E:\SECBackups\SOPHO.bak

If at first you don't succeed, you will find many option switches listed by
START /?

Regards
Alan