Feature requests: exclude files in use; separate delete settings

Discuss new features and functions
Posts: 5
Joined: 11 Apr 2016

sss

I'm using FFS to sync recorded TV from my PC to a NAS. Sync occurs automatically when a recording finishes or is deleted from the PC.
This works really well, except for when there are overlapping recordings - if another recording is still in progress when one finishes, the incomplete recording also gets copied to the NAS. This is not a huge deal in itself, but it results in unnecessary network traffic (these are very large files), and it also causes problems with versioning (see below).

Hence feature request #1: the ability to exclude files that are in use.

We usually watch TV from the NAS, and delete the recording when done. To guard against accidental deletion I use versioning to keep a copy of the deleted file on the PC. However in the above scenario (overlapping recordings), the incomplete recording gets versioned on next sync. This is also unnecessary because I don't care about the incomplete recording and never want to keep it. So it clogs up my versioning folder. As a workaround, I've got a batch file that removes these (it just checks to see if the file exists in the recording directory). The batch file runs after each sync.

Hence feature request #2: separate "delete" settings for delete vs update operations. I would like to choose "Permanent" for updated files, and "Versioning" for deleted files.

Either of these two features would solve my problem (#1 would be ideal as long as there's a way to detect this properly), but I think a combination of both would be better.

Thanks :-)
Posts: 5
Joined: 11 Apr 2016

sss

Update - I'm now having problems with the incomplete recording being updated on the NAS if my HTPC is on - consequently FFS detects a conflict and does nothing, so the NAS version remains incomplete. So my feature request #1 is even more important.

Strictly speaking I don't need a two-way sync, but the "custom" option doesn't appear to let me handle deletes from the NAS (ie file has been sync'd to the NAS and then deleted - which is not the same as "item exists on left side only"). It would be great if custom could also make use of a database like two-way sync and allowed for more configurable options.
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

To disable copying of locked files go to menu -> tools -> options and uncheck "copy locked files".
Posts: 5
Joined: 11 Apr 2016

sss

Thanks Zenju, but I don't have that option checked. The files are not locked by Media Center but they are in use...
Posts: 5
Joined: 11 Apr 2016

sss

That is to say, the files are opened for write but not for exclusive access - they can still be copied, but not moved or deleted. If the "locked files" feature is meant to refer to files opened for writing then perhaps it's not working correctly.
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

In this case your HTPC is writing files but is granting other processes read access at the same time. This is unconventional but makes sense here because for example media player apps are then able to play the file while the recording is still active. For file copying however this means that partial data will be copied instead of failing with an access violation. Consequently FreeFileSync's VSS feature is not used at all.

I think the design problem is with the Windows file copy routine CopyFileEx which FFS is using and which allows copying files that are open for write access. FreeFileSync could add a check to see if the source file is not being written to, but it's unclear how much collateral damage this might cause: a lot of FireFox' .sqlite .db files are always open with write-access but share read-access although most of the time FireFox does not actually write data. Since this is a change of FreeFileSync's core routine it has the potential for regressions.
Posts: 5
Joined: 11 Apr 2016

sss

Yes, it would need to be an option that could be selectively enabled - possibly at file exclusion level.

For me this option would fix all the issues I am having. The biggest problem I now have though is that there is no way to resolve conflicts with a two-way sync. It would be great to be able to specify an "on conflict" setting for sync (eg copy left to right), however I acknowledge this would then not be a true sync.

I use my main PC as a media server and it does the recording - FFS runs on the PC to sync the recordings to the NAS. I sometimes watch the recorded TV on the PC, but also using the HTPC which reads from the NAS. So the PC is always the source of the latest files and should be "mirrored" to the NAS. However I delete after watching, so if the file is deleted from the NAS I also want it removed from the PC - this delete requirement means that I have to use a two-way sync. (Being able to keep a copy of the deleted file is great as it guards against accidental deletion).

The latest problem I have discovered is that if the HTPC is on, then when Media Center on the HTPC indexes an incomplete recording on the NAS, it updates the file (removes the free space used as a recording buffer). This results in the conflict.

Anyway, I think I will just write a short Perl script to do what I need instead of using FFS. It will still copy incomplete recordings but at least I can make sure it always copies if the file size differs, and I can avoid versioning of overwritten files.

Thanks for FFS anyway though... it's a good utility, just not for my application.