Batch file not completing

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
matchew
Posts: 1
Joined: 27 Aug 2010 04:20

Batch file not completing

#1 Post by matchew » 27 Aug 2010 04:24

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?

alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

Re: Batch file not completing

#2 Post by alan_b » 28 Aug 2010 05:25

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

Post Reply