File not found error when running batch file with Task Scheduler

Get help for specific problems
Posts: 4
Joined: 13 Jan 2021

guidodevizi

Immagine.png
I always got this "File not found" error when running FreeFileSync batch file from Task Scheduler.
These are the parameters of Task Scheduler:
"C:\Program Files\FreeFileSync\FreeFileSync.exe" "‪C:\SCRIPT\BatchRun.ffs_batch"

Can anyone help me to understand why is FreeFileSync to look for the batch file in that wrong location?
You do not have the required permissions to view the files attached to this post.
Posts: 1246
Joined: 8 May 2006

therube

Per the image, "C:\windows\system32\C:\SCRIPT\BatchRun.ffs_batch" will certainly be wrong as the syntax is invalid. (There is no space between the \system32\ & the C:\.)

And that points me to the Task Scheduler.

From that, it seems that the path part pointing to FreeFileSync.exe belongs in Program/script,
& the argument, your .ffs_batch path/name belong in the Add arguments: section.

Together, in that fashion, I'd think you should get your wanted results.
Posts: 4
Joined: 13 Jan 2021

guidodevizi

ffs.jpg
Thank you so much for replying
But as you can see the path is correct... so I don't understand why I am getting the error
You do not have the required permissions to view the files attached to this post.
Posts: 4949
Joined: 11 Jun 2019

xCSxXenon

By the error, it looks like it is a FFS error, so the program location is correct, but the argument is getting the extra "C:\Wind....m32\" location somehow. I can't see the end of the test, but make sure you have an ending quotation (") after ["C:\SCRIPT\BatchRun.ffs_batch]
Double check that the path to the ffs_batch file is correct
User avatar
Site Admin
Posts: 7566
Joined: 9 Dec 2007

Zenju

Maybe the typo is in the right part of "batchrun.ffs" that is cut off in the picture.
Posts: 4
Joined: 13 Jan 2021

guidodevizi

ffs2.jpg
as you can see, the typing is correct, including " at the beginning and at the end of program and of parameter.
really not able to understand why FFS is adding "C:\windows\system32\" before the location of the batch file...
You do not have the required permissions to view the files attached to this post.
User avatar
Site Admin
Posts: 7566
Joined: 9 Dec 2007

Zenju

A hidden Unicode character could be the explanation. Something after the quote of "C:\SCRIPT
Test: Copy and paste the string into a text editor and check with a hex editor.
User avatar
Site Admin
Posts: 7566
Joined: 9 Dec 2007

Zenju

And if that doesn't help: Send me a crash dump of FreeFileSync while it is showing the error message and I'll have a closer look: https://freefilesync.org/faq.php#crash
Posts: 4
Joined: 13 Jan 2021

guidodevizi

A hidden Unicode character could be the explanation. Something after the colon of "C:\SCRIPT
Test: Copy and paste the string into a text edit and check with a hex editor. Zenju, 15 Jan 2021, 08:52
SOLVED!!!!!!!!!
there was a hidden character after " and before C

thank you so muccccchhhhhhhhhhhhhhh!!!!!
Posts: 4949
Joined: 11 Jun 2019

xCSxXenon

So weird lol
Glad you got it sorted!
User avatar
Site Admin
Posts: 7566
Joined: 9 Dec 2007

Zenju

Which Unicode character was it?