dirpairs not changing batch file

Get help for specific problems
Posts: 6
Joined: 18 Jun 2023

DLR99

Hi, I'm new to FFS and evaluating for use in our company. I created a bat file for testing purposes that uses -dirpair to modify the directories of an existing batch file.

"C:\Program Files\FreeFileSync\FreeFileSync.exe" "C:\path\BatchRunA.ffs_batch" -dirpair "C:\DirA" "P:\DirB"

When I run the bat file, it does a sync between DirA and DirB but does not change the directories in the batch file itself. Appreciate any help on what I am doing wrong. Thanks.
User avatar
Posts: 4867
Joined: 11 Jun 2019

xCSxXenon

This is a temporary flag and isn't intended to modify the configuration permanently
User avatar
Posts: 2946
Joined: 22 Aug 2012

Plerry

If you need to need to change the left and right base-location(s) in an existing file itself, you would need a script that edits the *.ffs_batch file itself.
All those files are XML files.
In the XML file, you should identify the <FolderPairs>...</FolderPairs> tag, that will comprise one or more <Pair>...</Pair> tags, that in turn will each comprise a <Left>...</Left> and a <Right>...</Right> tag, specifying respectively the left and right base-location of that Pair.

With a suitable user-script you should be able to open the XML-file, identify the <Left>...</Left> and a <Right>...</Right> tag(s), replace their content to match your new(dirpair) base-locations, save the modified XML file under the same or a different name and, if so desired, invoke FFS to run the just saved configuration.
Posts: 6
Joined: 18 Jun 2023

DLR99

Thank you both for your replies, I misunderstood the usage of dirpair.