It's all good, luckily not a massive problem to recover. New changes sound positive.
For the unexpected token error, it just seems the command isn't escaping out some characters when running the stat -c%W command, all examples I've seen have brackets somewhere in the path. I also just noticed I get loads of the below appear in the logs as well. With that one it seems to truncate and line cartridge where there are spaces in the path so something like
"/mnt/user/Download/Dir1/dir2/dir 5/Dir6 1234 5678/File 1234 5678.txt"
Comes out like below so I'm guessing a split command or something is doing something screwy.
move: stat: cannot statx '/mnt/user/Download/Dir1/dir2/dir': No such file or directory
move: stat: cannot statx '5/Dir6': No such file or directory
move: stat: cannot statx '1234': No such file or directory
move: stat: cannot statx '5678': No such file or directory
move: stat: cannot statx 'File': No such file or directory
move: stat: cannot statx '1234': No such file or directory
move: stat: cannot statx '5678.txt': No such file or directory
The files that don't error, don't look particularly different as they have spaces, brackets, same file paths etc, so not sure why it fails for some and not others. I'll try it with mtime set and see if it does the same and try spot any patterns and report back.
Yeah, I've never found ctime particularly reliable so don't envy you trying to figure out a solution! At the mo I workaround it with a python script that figures out the logic for time based and write files paths to an ignore list. I just use ctime in the mover as a safety net, so nothing too new accidentally slips in a move when it shouldn't.