Having trouble with Win10 scheduled task.

Get help for specific problems
Posts: 19
Joined: 11 Mar 2021

Bordonbert

Hi guys. I have a simple Synology DS220j NAS drive which I have used for years without any problems. I now want to set up a Windows task to set FreeFileSync to backup my entire Documents folder each night. I've created a shared folder on the NAS drive to act only as a store for this and successfully mapped it to a drive letter on the PC. (It looks odd as B:\ but it was only to remind me it was only for "B"ackup.) I have also set up a batch file in FFS which does the job manually, simply mirroring the Documents folder to the shared folder on the NAS. This all works perfectly if used manually. Next step Windows Scheduler...

I have set up a task in Scheduler to run up FFS and run the batch file at a set time each night, whether I am logged in or not, (I am effectively always logged in with admin privileges). The task successfully runs up FFS and its batch file at the correct time and tries to perform the task but I always get the same error:


Cannot find the following folders:
B:\
_____________________________________
Cannot read the file attributes of "B:".
ERROR_PATH_NOT_FOUND: The system cannot find the path specified. [GetFileAttributes]


But the darned B:\ drive is sitting there in File Explorer laughing at me and can be used in any way I want manually. As I said that batch file runs perfectly if triggered from FFS itself. Can anyone point me at what I am missing here?
User avatar
Posts: 4866
Joined: 11 Jun 2019

xCSxXenon

If you check that option, the Task is ran under the SYSTEM user, which does NOT have the drive mapped as B:\. You can try to change the settings so the sync uses the hostname\sharename instead of a drive letter. You can also disable that option if you don't need it to run whether logged in or not. Unless that share has public/unauthenticated access, you may run into permission issues anyway since adding permission for SYSTEM can be a pain in the butt
Posts: 19
Joined: 11 Mar 2021

Bordonbert

Thanks for that wise advice xCSxXenon, it worked immediately. It never occurred to me to try the IP address of the NAS drive as an alternative to the mapped drive letter. And there was me thinking that would make things easier. As soon as I set FFS up to reflect to "\\192.168.1.XXX\[Backup folder]" it asked for authentication and when I entered that off it went. Your help is really appreciated, thanks again.