I am hoping I can use FFS to resolve a problem I have with RoboCopy.
I have been successfully using RoboCopy to backup various shares on my Windows 10 "Home" Server to a directory on an external eSATA drive. This directory is the OneDrive root folder. As a result, any file or folder copied to this directory gets backed up to OneDrive.
I am using “Robocopy "D:\Documents" "E:\Onedrive\Documents" *.* /E /COPYALL /XO /MT[:n]” which I think is the equivalent of Contribute in FFS
(Note: I am aware some people do not consider OneDrive a "secure backup" however there is a local copy on the eSATA drive and I also backup a second copy to another PC which also backs up to separate OneDrive account)
The problem with the way I have configured Robocopy is that if I change the source file name or location (e.g. edit a photo and rename it or move to its final destination folder) I end up with duplicate copies of the same file on OneDrive which is using up space.
This is shown in the RoboCopy log file as "*EXTRA Dir" or "*EXTRA File" in the destination folder.
I don't want to MIRROR the source and destination in case I accidentally delete a file in the working directory, as that will also delete the backup copy.
Does FFS create a log which includes any directories or files that are located in the destination directory that are NOT in the source directory? If so, is it possible to use the log to instruct FFS to Move any EXTRA Files or EXTRA Directories, to another location. I can then periodically review these and delete them if they are duplicates.
Many thanks
How to deal with *Extra Files and directories
- Posts: 5
- Joined: 23 Jan 2022
- Posts: 4056
- Joined: 11 Jun 2019
You probably want to add /MIR to your RocoCopy command, no?
- Posts: 5
- Joined: 23 Jan 2022
Many thanks for responding.You probably want to add /MIR to your RocoCopy command, no? xCSxXenon, 06 Mar 2024, 17:37
No because this is the MIRROR switch. If I use MIRROR robocopy will delete any files in the destination folder that are not in the source. Therefore if I accidentally delete a file it deletes it from the backup.
At the moment I am using FFS Compare between the two folders. This successfully identifies any files in the destination folder that are not in the source. If only I can use this to then move the results into another folder this would achieve what I need. I only need to run this occasionally to clear out duplicates. Can you swap sides and then choose a new folder to move to? I don't want to experiment on the live backup.
- Posts: 4056
- Joined: 11 Jun 2019
You should just use FFS from the get-go then, as it can detect files that are moved/renamed instead of creating duplicates
- Posts: 5
- Joined: 23 Jan 2022
Ahh I wasn't aware of that. Does it detect files that have been moved into new directories?
For example I download all my photos from my iPhone using Photosync. This goes into a default folder "Downloaded Photos"
From here I delete the ones I don't want and then rename them from the original file name e.g. IMG-1689 to "Xmas Day 2023(1).jpg" and move them to a folder "2023-12-25 Christmas Day".
Currently Robocopy which runs nightly will see the original picture IMG-1689 and copy it to a folder Downloaded Photos. It will also find and copy the renamed photo "Xmas Day 2023(1).jpg" to a folder "2023-12-25 Christmas Day" which it creates if its not already there. The result is two identical photos with different file names in different folders.
Are you saying FFS is smart enough to identify each individual file despite its date stamp and file name and only copy it if it's not already in the destination?
Many thanks
For example I download all my photos from my iPhone using Photosync. This goes into a default folder "Downloaded Photos"
From here I delete the ones I don't want and then rename them from the original file name e.g. IMG-1689 to "Xmas Day 2023(1).jpg" and move them to a folder "2023-12-25 Christmas Day".
Currently Robocopy which runs nightly will see the original picture IMG-1689 and copy it to a folder Downloaded Photos. It will also find and copy the renamed photo "Xmas Day 2023(1).jpg" to a folder "2023-12-25 Christmas Day" which it creates if its not already there. The result is two identical photos with different file names in different folders.
Are you saying FFS is smart enough to identify each individual file despite its date stamp and file name and only copy it if it's not already in the destination?
Many thanks
- Posts: 4056
- Joined: 11 Jun 2019
If you are renaming/moving files, FFS can detect that and avoid duplicating the file on the destination. FFS isn't a duplicate finder though, so make sure you are renaming/moving the file(s), not copying them.