synchronizationbackup

linux/ubuntu batch scripts with FreeFileSync


How can I execute a FreeFileSync batch script on Ubuntu?

I have set up a batch job, saved in a file with extension ".ffs_batch". What now? If I double-click on it, there is no file association.

I am familiar with executing .bat files on Windows by double-clicking, but I'm on Ubuntu. I expect there to be a command-line like: sudo something batchjob.ffs_batch. Or do I need to set the correct file association before executing? Or write yet another script to execute the .ffs_batch files.

I am on kUbuntu 10.10. I installed FreeFileSync via the program uploader (so may not be the absolute latest version)

Needless to say I do have access to Google and the Help files. There is plenty of info on what to do under Windows, but I couldn't find the relevant explanation for Linux.

Here is all the info I have at this time:

FreeFileSync Help

Batch Scripting FreeFileSync can be called from command line and supports integration into batch scripts. This section gives some general hints and examples for Windows *.cmd and *.bat scripts. When FreeFileSync is started in batch mode (a *.ffs_batch file is passed as argument) it returns one of the following status codes:


Solution

  • It appears you didn't understand what FreeFileSync documentation was trying to tell you. The scripts themselves are not like .bat files, i.e., they are not self-executable. Ubuntu has no idea what to do with the file that you're double clicking. They need to be passed into the command line prompt for FreeFileSync in some pre-defined interface. Probably something like:

    ./free_file_sync myBatch.ffs_batch

    I'm not sure what the executable is called, but it's probably something along those lines.