I am running a simple batch file that uses START /w to start a cmd file. It is important that the file finished before it continues executing the batch file. Start /w stops the batch file from continuing but it does not recognize when the cmd is finished. Consequently, The batch file is never continued.
I have tried START /w and START /wait. Neither works.
How do I make the batch file understand when the cmd file is done.
This batch file is intended to start a series of backup programs and record the time and date that each backup was completed by creating an empty folder at the top of each directory backed up. It is important the the empty directory is not created until the backup is finished.
Code: Select all
ECHO ON
CD /d C:\Temp
RD "$LAST BACKED UP"
MD "$LAST BACKED UP"
CD /d D:\
RD "$LAST BACKED UP"
MD "$LAST BACKED UP"
REM 00-Backup-JFileSync is the directory where the backup program is located
CD D:\00-Backup-JFileSync
Start /w 00-CTempTest
CD D:\000-BackupTest
RD "$LAST BACKED UP"
MD "$LAST BACKED UP"
CD D:\00-Backup-JFileSync
Start /w 00-BackupTestDtoZ
CD D:\
RD "$LAST BACKUP FINISHED"
MD "$LAST BACKUP FINISHED"
Thank you in advance for your help.
Jim