[RealTimeSync (RTS)] Parsing Error During Log File Output

Get help for specific problems
Posts: 1
Joined: 9 Dec 2021

robiv21151

Environment: Microsoft Windows 10 Pro 10.0.19043 Build 19043

Steps to Reproduce:

•Use RTS to generate initial *.ffs_real file by "Save as..."
•Modify *.ffs_real to include log file generation code from user manual:
echo %change_action% "%change_path%" >> ...
Expected Result: Log file generated after synchronization event in the specified directory with the filename format of:
%TimeStamp%.log
[YYYY-MM-DD hhmmss].log
Actual Result: Parsing Error and Error Code 3

Contents of Config File:
1  <?xml version="1.0" encoding="utf-8"?>
2  <FreeFileSync XmlType="REAL" XmlFormat="2">
3      <Directories>
4          <Item>
5              %UserProfile%\Downloads\unsy
6          </Item>
7          <Item>
8              [USB_DEVICE_NAME]\unsy
9          </Item>
10     </Directories>
11     <Delay>
12         10
13     </Delay>
14     <Commandline>
15         "C:\Programs\FreeFileSync\RealTimeSync.exe" ^
16         "C:\Programs\FreeFileSync\configurations\work_bkup.ffs_real" ^
17         echo %change_action% "%change_path%" >> [USB_DEVICE_NAME]\ffs.logs\%TimeStamp%.log.txt
18     </Commandline>
19 </FreeFileSync>
20
21 <!--
22 Error Received:
23
24     Error parsing
25     "C:\Programs\FreeFileSync\configurations\work_bkup.ffs_real", row 17, column 47
26
27 Followed by:
28
29     Command: "C:\Programs\FreeFileSync\RealTimeSync.exe" "C:\Programs\FreeFileSync\configurations\work_bkup.ffs_real" failed.
30
31     Exit code 3
32 -->
~~

How do I properly format the Command so that the parsing error does not occur? I'm at a bit of a loss as the ">>" is specified in the manual, but there is limited information about the format of the configuration files.

Thanks,
-robiv
Posts: 1202
Joined: 8 May 2006

therube

Modify *.ffs_real to include log file generation code from user manual
Link to that? -> External Applications (is that correct?)

In 15 (& 16) you've got an '^' in there.
Is that expected?
(I just mentioned, indirectly, ^, today, File Name Quoting.)
(I'm guessing the ^ don't actually exist in .ffs_real, & are only an indicator of a "line continuation", above.)

If it is External Applications, is that code (echo...) allowed to be placed in .ffs_real (.ffs_batch ...) or is it only intended to be used from the GUI itself?

I'm thinking your echos are not allowed in .ffs_*, but rather only through the GUI (with the "echo" code being store in GlobalSettings.xml).

Oh, it's RealTimeSync...


So... on the premise that your echo can go in the .ffs_real, I'm not clear on where it should go?
Without testing, if I had to guess, I'd put it on its own separate line, just below the "C:\Programs\FreeFileSync\RealTimeSync.exe ..." line.
User avatar
Posts: 4867
Joined: 11 Jun 2019

xCSxXenon

echo %change_action% "%change_path%" >> %csidl_Desktop%\log.txt
Pulled from this section: https://freefilesync.org/manual.php?topic=realtimesync

I don't think you are using it correctly. To be fair, it is not clear at all in the manual and needs to be clarified.
So my guess is adding it to the end of your command that RTS runs won't work, it's just passing it as extra parameters to the executable called. I would try adding it as a "post-sync" command if the next part doesn't fix it.
The command line in RTS should start with the FFS exe, not RTS. You have the command set to run RTS again. Usually your best bet is to drag your .ffs_batch config onto the RTS window so it auto fills everything you need.

So two things:
1. Fix the command line in RTS to call the FFS exe
2. If that doesn't fix the original issue, and I don't think it will, take the "echo %change_action% "%change_path%" >> [USB_DEVICE_NAME]\ffs.logs\%TimeStamp%.log.txt" out of the command that RTS runs and add it as a post-sync command in the FFS batch config.
User avatar
Posts: 4867
Joined: 11 Jun 2019

xCSxXenon

I also just realized you are passing a ffs_real config to RTS in the command...
Why are you doing this? Is that on purpose??
Read the manual page I linked for the RTS setup steps