Hello, here is the snippet of code from my app that launches "FreeFileSync":
//// Path to the FreeFileSync executable
sCheminExe is a string = "C:\Program Files\FreeFileSync\FreeFileSync.exe"
// Launch the application
ShellExecute(sCheminExe)
FinProgramme //("See you soon.")
What I would like to do is launch "FreeFileSync," run the backup, and then close "FreeFileSync" once the backup is complete.
Could you help me set this up?
Thanks
Best regards
Command line from my WinDev 28 application
- Posts: 1
- Joined: 7 Aug 2026
- Posts: 1239
- Joined: 8 May 2006
Alternatively, but it would be ugly, you could do something like...
in FFS, F8 (Synchronization), Run a command: On completion: FFS_DONE.bat
FFS_DONE.bat:
.
(pseudo-code)
runandquitFFS.bat:
So...
FFS runs
when it is finished it creates a file
"poll.exe" (a made up executable) tests for the existence of that file name
until it exists, nothing happens
when it exists, it then knows that FFS has completed, so at that point, the batch file continues
& taskkill kills (closes) FFS
& you're done ;-)
in FFS, F8 (Synchronization), Run a command: On completion: FFS_DONE.bat
FFS_DONE.bat:
FFS_DONE.bat
ECHO DONE > C:\OUT\FFS_IS_DONE.TXT
(pseudo-code)
runandquitFFS.bat:
FreeFileSync.exe <params as wanted>
:: poll for existence of C:\OUT\FFS_IS_DONE.TXT
poll.exe C:\OUT\FFS_IS_DONE.TXT
taskkill /IM FreeFileSync_x64.exe
DEL C:\OUT\FFS_IS_DONE.TXT
FFS runs
when it is finished it creates a file
"poll.exe" (a made up executable) tests for the existence of that file name
until it exists, nothing happens
when it exists, it then knows that FFS has completed, so at that point, the batch file continues
& taskkill kills (closes) FFS
& you're done ;-)