Hello,
I transfer pdf-files from my local drive to a folder on my webspace. There runs a process that, after being finished, moves the files to a subfolder. So every time FFS runs, it thinks the local files are missing on the remote drive and transfer then again.
So can I move the sunced files locally to a subfolder after being transferred to the remotefolder?
Move Filses after sync
- Posts: 2
- Joined: 25 Jan 2024
- Posts: 4056
- Joined: 11 Jun 2019
You can define a post-sync command that runs after FFS finishes a sync. Use this area to run a command or script that moves the files
- Posts: 2
- Joined: 25 Jan 2024
So no build in function but the possibility to run a batch, right?
BUT: What if, while syncing, new files arrive in the source folder, that would be moved by the batch, that does not know, which files have been synced.
BUT: What if, while syncing, new files arrive in the source folder, that would be moved by the batch, that does not know, which files have been synced.
- Posts: 4056
- Joined: 11 Jun 2019
That is an edge case that you would have to account for, yes.
I would resolve that by creating a batch script that creates a 'processing' folder, moves all files currently in the source folder to that subfolder, calls the FFS sync job, then deletes that 'processing' folder once everything completes. You will want some error checking in there to check the exit code that FFS returns in case not all files get moved over
I would resolve that by creating a batch script that creates a 'processing' folder, moves all files currently in the source folder to that subfolder, calls the FFS sync job, then deletes that 'processing' folder once everything completes. You will want some error checking in there to check the exit code that FFS returns in case not all files get moved over
- Site Admin
- Posts: 7210
- Joined: 9 Dec 2007
Sounds like this case can be solved via the "Update" variant.
- Posts: 4056
- Joined: 11 Jun 2019
I don't think so. If new files are created in the source during a sync, they won't get transferred to the destination, then the post-sync command will delete everything in the source, thus removing the new files that weren't yet copied to the destination.Sounds like this case can be solved via the "Update" variant. Zenju, 26 Jan 2024, 09:49
- Posts: 1037
- Joined: 8 May 2006
If after a sync has been run, you parse the .log file, & for every "Verifying file" entry in the log, if you then moved all those associated source files out of the source directory, then the only files left in source would be new files that ended up in there during or after the last sync process.
That done, you can at that point, or whenever, run another (Update) sync, to do it all over again.
(I don't know what a failed 'Verifying file' entry might look like, so you might want to take that into consideration.)
That done, you can at that point, or whenever, run another (Update) sync, to do it all over again.
(I don't know what a failed 'Verifying file' entry might look like, so you might want to take that into consideration.)
- Site Admin
- Posts: 7210
- Joined: 9 Dec 2007
No, I meant instead of the "post sync script". If the move operation happens on the server, and OP wants it to also happen locally, then maybe "Two Way" does the job.I don't think so. If new files are created in the source during a sync, they won't get transferred to the destination, then the post-sync command will delete everything in the source, thus removing the new files that weren't yet copied to the destination. xCSxXenon, 26 Jan 2024, 16:43Sounds like this case can be solved via the "Update" variant. Zenju, 26 Jan 2024, 09:49