I'm using FreeFileSync to back up to a removable drive. The backup details are saved in a FFS batch file that is run by Windows 11 Task Scheduler.
When the removable drive is not connected, FFS tries to run the batch job and pops up error messages about its inability to find the drive and folders to scan and compare.
Is there a way to set up the batch file or the Windows Task so that the batch file either doesn't run or just shuts itself off when the removable drive isn't connected?
How to cancel a FFS batch job when removable drive isn't connected
- Posts: 15
- Joined: 27 Jan 2023
- Posts: 2450
- Joined: 22 Aug 2012
Consider using RealTimeSync (RTS)
The function of RealTimeSync is to execute a command line each time it detects changes in one of the monitored directories, or when a directory becomes available (e. g. insert of a USB-stick). Usually this command line will trigger a FreeFileSync batch job.
- Posts: 15
- Joined: 27 Jan 2023
I'm aware of RTS and have used it before. My need is about 180 degrees opposite to that. When I'm at home, the backup drive is always plugged in, so it wouldn't trigger RTS by being attached. The backups run on schedule.
When I'm away from home and the backup drive is left at home, the regularly scheduled sync gives error messages when it can't find the backup drive. What I want is either some way to have the sync cancel itself when the backup drive is not attached or for it to at least shut itself off without error messages.
When I'm away from home and the backup drive is left at home, the regularly scheduled sync gives error messages when it can't find the backup drive. What I want is either some way to have the sync cancel itself when the backup drive is not attached or for it to at least shut itself off without error messages.
- Posts: 4056
- Joined: 11 Jun 2019
You will need to create a batch script that detects the presence of the backup drive to decide if FFS should run or if the script should just terminate. Then the task should run that script
- Posts: 15
- Joined: 27 Jan 2023
The last time I wrote BAT files was maybe 1993. Guess I'm gonna have to do a little studying.