Cannot delete files - access denied

Get help for specific problems
Posts: 3
Joined: 31 Mar 2013

theancient1

On my W7/64 machine I am trying to mirror a local drive (S) to a directory on a local USB flash drive (F:\04 Source) via a nightly batch job.
When the scheduler runs this job and there are files to be deleted (They have been deleted on "S" and should now be deleted on "F" as well) FFS gives me an error: "Error: Cannot delete file 'file name' Windows Error Code 5: Access is denied." This only happens for “some” files / directories
When I come back in the morning and re-run this batch job manually, the remaining files are deleted
As this happens almost every night, it defeats the intent of an unattended nightly sync job.

* I am the owner of all directories / files
* The job is running from an administrator account (UAC is turned off)
* I have given "Full Control" access to "everyone" (icacls F: /grant Everyone:(F) /T)
* the FFS task runs with "highest privileges" in Windows Task scheduler
* FFS Options: Mirror, Error Handling: "Ignore", Deletion Handling: "Permanent"

Any idea why this happening and how I can fix it?
(This has never happened when running the batch job manually)

Thank you very much for your help.


PS.: It took me some time to figure out that I had to register with sourceforge in order to be able to post here. It might be nice to update the FFS help file to give the procedure to obtain help.
Posts: 3
Joined: 31 Mar 2013

theancient1

Hi there,
I haven't had a reply on this problem in a some 6 weeks so I thought I'd give it a "BUMP".
Does anyone have any ideas as to what can be done to resolve this problem?
Posts: 141
Joined: 10 Sep 2009

srjones67

Full control or not if a file is locked by another process you'll get access denied. It's not a FFS issue. Trying to backup system folders?
Posts: 3
Joined: 31 Mar 2013

theancient1

Full control or not if a file is locked by another process you'll get access denied. It's not a FFS issue. Trying to backup system folders?srjones67
I do not believe any file is ever locked: The "F" drive is a USB Flash drive (aka USB stick) that contains a backup (mirror) of my "S" ("Source") drive. If a new version of software (free or paid) is released, I download the new version to the source drive and then remove the old version from the source drive. Overnight, this change should also be reflected on the USB stick. FFS has no problem copying the new version to the USB stick but for some reason it cannot remove the old version. (Having a copy of the source of software saves me from having to download it multiple times)