Automic Workload Automation

 View Only
  • 1.  FreeFileSync

    Posted Aug 07, 2018 11:50 AM


    Does anyone here use FreeFileSync? I am trying to automate .ffs_batch job in Automic but I am getting an error but the process works when I run it manually (via cmd). FYI - I am using v10. The job fails but there's no info in the report.


    Here's what I've tried so far with no luck:

    1) Ran this command in a windows job C:\Program Files\FreeFileSync\FreeFileSync.exe" "C:\Program Files\FreeFileSync\My Batches\Myfilename.ffs_batch"

    2) Ran (1) with "Log on as batch user" option and also with "Show job on desktop" option

    3) Put the command (1) in a batch file and called the .bat file in a windows job (D:\BatchFile\FFS.bat)


    What am I doing wrong?

  • 2.  Re: FreeFileSync

    Posted Aug 07, 2018 12:57 PM

    If you are using this tool for synchronizing windows folders quickly/efficiently, I would suggest using the robocopy command instead.  Its mirror option is powerful, and won't copy files that haven't changed.  


    If your FreeFileSync wants to open any dialog boxes at runtime, then CA-Automic will not be able to run it.  Many programs have a way to run silently though with no dialog box pop ups.  FreeFileSync may have such an option.


    I did a quick google, and it looks like the FreeFileSync installer has a /silent option.  But it has to be installed that way...

  • 3.  Re: FreeFileSync

    Posted Aug 08, 2018 04:41 AM

    If you do use Robocopy (which is not a bad tool at all) in Automic, have a look at the command line options and make sure to write more sane retry options into the registry once on every machine.


    The default is one million retries at 30 second intervals, which will make Robocopy retry for roughly one year for every single error:



    So you probably want /R:1 /W:1 /reg, or even /R:0 /W:0 /reg.


    To this day I wonder what Microsoft was thinking with that default.

  • 4.  Re: FreeFileSync

    Broadcom Employee
    Posted Aug 07, 2018 05:35 PM

    Does FreeFileSync have a command line interface?

  • 5.  Re: FreeFileSync

    Broadcom Employee
    Posted Aug 07, 2018 06:46 PM

    Hi JGi604607 ,


    I can see paths with spaces, that might cause some problems on Windows

    Please try to use the short path, you can get those with dir /x, utilizing PROGRA~1 rather than Program Files.




  • 6.  Re: FreeFileSync

    Posted Aug 08, 2018 04:55 AM

    I seriously wonder when this can be laid to rest.


    Upcoming week it's 22 years to the day that Microsoft released an OS which used "Program Files" with a space as part of the default setup, and the UNIX world is managing just fine since the dawn of the epoch with escaping or quoting spaces, which is fully supported on Windows just the same. The OP appears to have quoted his command line, so he should probably be in the clear. If there are still applications that truly can't deal with spaces, despite the fact that the Win32 API supports this for ages, those applications frankly deserve to die.




  • 7.  Re: FreeFileSync

    Posted Aug 10, 2018 03:56 PM

    Thank you all for the replies.

    I just found out that the job is actually syncing even though I am getting "Ended_not_ok."

  • 8.  Re: FreeFileSync

    Broadcom Employee
    Posted Aug 10, 2018 04:00 PM

    What is printed to the job report? We can dynamically change the status.

  • 9.  Re: FreeFileSync

    Posted Aug 10, 2018 04:05 PM

    It just shows the content of the job.


    d:\>"C:\Program Files\FreeFileSync\FreeFileSync.exe" "C:\Program Files\FreeFileSync\My Batches\Jobname.ffs_batch"

  • 10.  Re: FreeFileSync

    Posted Aug 13, 2018 03:52 AM

    Try putting this at the end of your batch file, and also directly underneath your FreeFileSync command, if those two things are not identical:


    if NOT %ERRORLEVEL% == 0 echo "errorlevel not zero"


    If that text then shows in the UC4 report, there is some error happening. Maybe it syncs all of the files but one or there is some other error in between? It's sometimes easy to miss for tools that output multiple pages of report. The above is how Automic checks for any errors for Windows jobs, it's purely based on the value of %ERRORLEVEL% (at least in the default template for Windows jobs).


    I'd not change the status "dynamically" in Automic if there is a legitimate reason for the tool reporting an error. If you do this, you might risk missing any potential, actual problems.