Hi
Have recently upgraded to latest version and my batch files have stopped working
If I run the batch commans in powershell I get the following:
PS C:\Users\stuar> "C:\Program Files\FreeFileSync\Bin\FreeFileSync_x64.exe" "D:\FreeFileSync\BatchRun-Shared-Videos_new.ffs_batch"
At line:1 char:58
+ ... eSync_x64.exe" "D:\FreeFileSync\BatchRun-Shared-Videos_new.ffs_batch"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '"D:\FreeFileSync\BatchRun-Shared-Videos_new.ffs_batch"' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
Batch File not working
- Posts: 4
- Joined: 5 Feb 2023
- Posts: 936
- Joined: 8 May 2006
If you run the same from a C: prompt, does it work?
What OS?
Recent OS "upgrade"?
And to be clear, this has worked for you in the past?
What OS?
Recent OS "upgrade"?
And to be clear, this has worked for you in the past?
Last edited by therube on 06 Feb 2023, 20:28, edited 2 times in total.
- Posts: 4
- Joined: 5 Feb 2023
Hi
Yes was working until I upgraded to latest version (not sure what the previous version was)
I'm on Windows 10 Pro Version 22H2 OS Build 19045.2546 with Windows Feature Experience Pack 120.2212.4190.0
I have tried moving the config file to be on the c: drive and that's made no difference
Yes was working until I upgraded to latest version (not sure what the previous version was)
I'm on Windows 10 Pro Version 22H2 OS Build 19045.2546 with Windows Feature Experience Pack 120.2212.4190.0
I have tried moving the config file to be on the c: drive and that's made no difference
- Posts: 936
- Joined: 8 May 2006
In PS (in Win7, FFS 12.0), using a full path to the program, I am not getting things working.
(I'm not familiar with PS.)
If I start PS in the /FFS/ directory, then only use (& the .\ is seemingly needed)
.\freefilesync <pathto.ffs_batch>
then it does work.
(I'm not familiar with PS.)
If I start PS in the /FFS/ directory, then only use (& the .\ is seemingly needed)
.\freefilesync <pathto.ffs_batch>
then it does work.
- Posts: 4
- Joined: 5 Feb 2023
yep - that works - so how do I set that up in windows task scheduler?
The config shown in the pdf of instructions on page 22 doesn't work - the process runs but never finishes and makes an annoying alert sound to signify its still running - can see process in task manager but it never appears in task bar
The config shown in the pdf of instructions on page 22 doesn't work - the process runs but never finishes and makes an annoying alert sound to signify its still running - can see process in task manager but it never appears in task bar
- Posts: 6
- Joined: 17 Mar 2023
I am seeing the exact same problem as en8scl. I am now trying to setup in task scheduler (win10) and have changed my previously working setup from "C:\Program Files\FreeFileSync\FreeFileSync.exe" to just .\FreeFileSync.exe but set the startup directory to "C:\Program Files\FreeFileSync\". Still doesnt work. I reiterate this was working fine a few weeks back - I have only just noticed it wasn't working. As you said in powershell if I CD to the FFS directory and execute the command .\FreeFileSync.exe "C:\Users\David\Documents\GPLBackup.ffs_batch" it works (but not if I add quotes ".\FreeFileSync.exe")
Any suggestions?
Any suggestions?
- Site Admin
- Posts: 7042
- Joined: 9 Dec 2007
Power shell has a different syntax than the command prompt. If you want to test syntax in order to set up Windows task scheduler, you need to use the command prompt ("cmd").
- Posts: 6
- Joined: 17 Mar 2023
Thanks for your reply Zenju. If I enter the command in 'cmd' with quotes it works. However it does not work via Task Scheduler. After some investigations the only way I can get it to work via Task Scheduler is to install FFS into the route directory i.e. no spaces in the folder/file name. It appears as though there may be some problem with the way FFS handles spaces in folder/file names as other programs SEEM to work correctly.
- Site Admin
- Posts: 7042
- Joined: 9 Dec 2007
The syntax detailed in the manual should work: https://freefilesync.org/manual.php?topic=schedule-batch-jobs#windows
- Posts: 4
- Joined: 5 Feb 2023
I agree with entdgc it doesn't behave as per manual when there are spaces in the file path name...
- Site Admin
- Posts: 7042
- Joined: 9 Dec 2007
Screenshots? Error messages?
- Posts: 3555
- Joined: 11 Jun 2019
Working for me. The quotations is what allows spaces in the path to be interpreted correctlyI agree with entdgc it doesn't behave as per manual when there are spaces in the file path name... en8scl, 19 Mar 2023, 16:37
- Posts: 6
- Joined: 17 Mar 2023
Yes I know it should work as per manual as that is what I followed originaly and it worked happily for many months. Only recently has it stopped working but I did not notice it had failed for some weeks so cant say whether a windows update caused the error or an FFS update? There is no error message given it simply fails. If I go into Task Scheduler and try and run the task again it just fails - FFS does not even flash up on the screen. I have tried adding '> error.txt' to the arguments but I just get an empty file. The only way I could get it to work was to instal FFS directly below the route directory. I am happy to do this and as others seem to find it works without this it must be installation specific. For completenes I am running Win10 Home 64bit vs 19045.2728 FFS vs 12.1. I would suggest we all just monitor the situation for now...