hello - thank you for reading my post.
I have a batch file which works, making an image of my system disc to my backup drive.
start "" "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /d:w1 /f:"B:\Image For Windows Test\Backup-w1-$~YYYY$-$~MM$-$~DD$-$~HHMM$" /vb /comp:2 /purge:-7 /desc:"Oct-Core System Disc"
This line works mirroring the folder to a secondary location -
robocopy "B:\Image For Windows Test" "\\freenas\Working\Image For Windows Test" /mir
The commands can be run correctly separately. When they are both in the same batch file the backup works but the mirror doesn't - the windows closes instantly.
Hopefully someone can help - basically i want a batch file to backup my drive and when this is finished - mirror to the secondary location. This is my attempt so far-
start "" "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /d:w1 /f:"B:\Image For Windows Test\Backup-w1-$~YYYY$-$~MM$-$~DD$-$~HHMM$" /vb /comp:2 /purge:-7 /desc:"Oct-Core System Disc"
robocopy "B:\Image For Windows Test" "\\freenas\Working\Image For Windows Test" /mir
Running robocopy after backup.
Re: Running robocopy after backup.
The 'start' command should use the /w parameter so that it waits until the imaging has completed.
Re: Running robocopy after backup.
i tried /w this gave an invalid parameter /w
i tried /wait and when i ran
start "" "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /d:w1 /f:"B:\Image For Windows Test\Backup-w1-$~YYYY$-$~MM$-$~DD$-$~HHMM$" /wait /vb /comp:2 /purge:-7 /desc:"Oct-Core System Disc"
robocopy "B:\Image For Windows Test" "\\freenas\Working\Image For Windows Test" /mir
this batch file is starting the backup and instantly the robocopy window before the backup finishes
thank you for your reply
i tried /wait and when i ran
start "" "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /d:w1 /f:"B:\Image For Windows Test\Backup-w1-$~YYYY$-$~MM$-$~DD$-$~HHMM$" /wait /vb /comp:2 /purge:-7 /desc:"Oct-Core System Disc"
robocopy "B:\Image For Windows Test" "\\freenas\Working\Image For Windows Test" /mir
this batch file is starting the backup and instantly the robocopy window before the backup finishes
thank you for your reply
Re: Running robocopy after backup.
The /w (or /wait) parameter is for the 'start' command, so it should be placed immediately after 'start' (with an intervening space).
Re: Running robocopy after backup.
that's working now - thank you very much
Re: Running robocopy after backup.
On 2016-11-19 5:15 PM, Ethereal wrote:
> i tried /w this gave an invalid parameter /w
>
> i tried /wait and when i ran
>
> start "" "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /d:w1 /f:"B:\Image For Windows Test\Backup-w1-$~YYYY$-$~MM$-$~DD$-$~HHMM$" /wait /vb /comp:2 /purge:-7 /desc:"Oct-Core System Disc"
>
> robocopy "B:\Image For Windows Test" "\\freenas\Working\Image For Windows Test" /mir
>
> this batch file is starting the backup and instantly the robocopy window before the backup finishes
>
> thank you for your reply
>
>
FYI, this reliably works for me:
SET PATH1=C:\PROGRA~1\TERABY~1\IMAGEF~1\V2\imagew.exe
SET PATH2=D:\PURGE
SET PATH3=U:\PURGE
SET PATH4=C:\Windows\System32\Robocopy.exe
"%PATH1%" /b /d:#0xCF554A0C
/f:"#0x800A0F72@0x1:\PURGE\$~YYYY$-$~MM$-$~DD$" /logl:10 /comp:14 /v
/purge:-2 /uy
"%PATH4%" "%PATH2%" "%PATH3%" *.tbi /mir /copy:DAT /r:0 /xj /v /tee /DCOPY:T
AlanD
> i tried /w this gave an invalid parameter /w
>
> i tried /wait and when i ran
>
> start "" "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /d:w1 /f:"B:\Image For Windows Test\Backup-w1-$~YYYY$-$~MM$-$~DD$-$~HHMM$" /wait /vb /comp:2 /purge:-7 /desc:"Oct-Core System Disc"
>
> robocopy "B:\Image For Windows Test" "\\freenas\Working\Image For Windows Test" /mir
>
> this batch file is starting the backup and instantly the robocopy window before the backup finishes
>
> thank you for your reply
>
>
FYI, this reliably works for me:
SET PATH1=C:\PROGRA~1\TERABY~1\IMAGEF~1\V2\imagew.exe
SET PATH2=D:\PURGE
SET PATH3=U:\PURGE
SET PATH4=C:\Windows\System32\Robocopy.exe
"%PATH1%" /b /d:#0xCF554A0C
/f:"#0x800A0F72@0x1:\PURGE\$~YYYY$-$~MM$-$~DD$" /logl:10 /comp:14 /v
/purge:-2 /uy
"%PATH4%" "%PATH2%" "%PATH3%" *.tbi /mir /copy:DAT /r:0 /xj /v /tee /DCOPY:T
AlanD