
But if you have a solution to just be able to launch the process and wait until it's closed to execute the rest of the commands, it would be really cool. Or I could just try and delete it every minute (not by force) and count on the protection of Windows that doesn't allow deleting active folders (although I'm not sure that this protection is implemented with cmd.exe) Another solution would be to wait a safe time period, like 30 minutes, before deleting the folder. I think it would be far easier to code than if I have to find a process in a text file (but maybe PowerShell could help me there, given that it can output objects). Not ideal, but a semi-solution nevertheless.
:max_bytes(150000):strip_icc()/zipgenius-5a7b5a6d31283400364acf36.png)
That is really not ideal, but it would allow me to avoid having a lot of heavy folders that do not disappear before one week: I would have just one. Otherwise, I could find and delete the folder remaining from the last run each time I run the script, and replace it. Should I add a few lines of code (using the handle command) to find the process of the sync, and constantly check if it's still active, to finally delete the folder when it closes? This comes from the fact that (correct me if I'm wrong) the command to launch the synchronisation launches another process rather than executing the sync entirely before executing the next command (here, delete the folder). My problem with the command that launches the synchronisation is not that FreeFileSync doesn't stop, but rather that cmd.exe does not wait for the process to stop before trying to delete the folder. I can't remember if I had checked the Auto-close box, so I exported the file again. 'freefilesync' is not recognized as an internal or external command, operable program or batch file. You can also schedule the execution of batch file at regular interval by Task SchedulerĮDIT: I forgot to say: at the end of the batch, clean (remove) the temp directory so you can start with a fresh one at next execution. Than, you can create a batch file Update.bat that do all the tasks sequentially calling: Than, with a simple command you can extract the files recursively to a specified folder.įinally, if everything works manually as expected, you can create a FFS batch for automating the sync. Than, add the path of the installation directory to the environment variable like stated here:
You can install it from the official site: To unzip it, the first simple solution that comes to my mind is to use the command line version of 7-Zip. To download it from command line you could use WGET or PowerShell: So the only 2 problem you need to resolve is to download the zip file and unzip it to a temp folder that will be the "source" for FFS.


Let me see if I have well understood what you want.įor the last 3 requisites, you can use the "Update" type of sync of FFS because it does exactly it, doesn't remove from destination deleted files on source, updates updated files and adds new ones.
