Quantcast
Channel: CobianSoft
Viewing all articles
Browse latest Browse all 4378

Cobian Reflector • Re: Run Backup when removable drive present

$
0
0
Good day.

There is a way to use a .bat file that pauses and thus prevents the backup from running until you unpause it. You still have to manually stop the backup before you unpause but at least it wont try to backup if the drive ain't there.

1st step is to is to make sure the drive always uses the same letter (some externals take the next open one)
Check out https://www.howtogeek.com/96298/assign- ... windows-7/
This still works about the same in windows 10 (I prefer to use X: or Z:)

Then copy and paste this code into notepad and save the file with .bat (remember to change Z: in line 2 if you don`t use Z:)
Taken and slightly edited from https://stackoverflow.com/questions/240 ... ce-of-code

Code:

:mainIF EXIST Z:\ (GOTO yes) ELSE (GOTO no)::I added this to help you see where the code just runs on to the::next line instead of obeying your goto statementsecho no man's land:yesexit:nopauseexit
Make the .bat file run as a pre-backup event in Cobain via Edit task -> Events > Pre-backup events -> Click add button and Execute and Wait.

Statistics: Posted by axeblade346 — 07 Apr 2022, 20:51



Viewing all articles
Browse latest Browse all 4378

Trending Articles