Dear rclone and data knowledgeable people, please try to help, I am lost... and for quite a while.
I get surprising sync updates. In log i see lines from output as in the command below like:
2026/06/02 10:24:05 INFO : <Folder location>: Set directory modification time (using SetModTime)
Where Folder location is a folder in a big tree. lines in the log above and below do not mention specifically this folder. Contents is compared to equal result.
The SetModTime triggers OneDrive to update the folder and that is not good, by far!
The TARGET_DIR is in use by OneDrive, it syncs it at its leisure. During rclone execution, OneDrive can be running normally, be paused or not running - makes no difference. SetModTime shows up.
Both SRC and TARGET_DIR are local folders.
Thanks for the report. The short version is that --no-update-dir-modtime should be stopping directory SetModTime. That log line shouldn't be able to appear when the flag is actually in effect - so I think the flag isn't reaching rclone in this run.
Set directory modification time (using SetModTime) is logged from exactly one place in the code, and the very first thing that function does is check the flag and bail out early if it's set. The sync layer also turns off all directory-modtime work up front when --no-update-dir-modtime is present, before it ever talks to the backend. So if you're seeing that line, --no-update-dir-modtime wasn't applied for that run.
A couple of things make me suspect the command that ran isn't quite the one pasted:
--modify-window 9999d is invalid. --modify-window takes a Go duration, which doesn't understand the d (days) unit - only --max-age/--min-age-style flags do. As written, rclone should exit immediately with:
Error: invalid argument "9999d" for "--modify-window" flag: ... unknown unit "d"
If you want a huge window, use hours, e.g. --modify-window 1000000h.
The Windows ^ line-continuation is easy to break - a trailing space after a ^ silently drops every flag after it.
To see what parameters are making it to rclone can you grab the line rclone prints at the very start of the -vv log:
DEBUG : rclone: Version "..." starting with parameters [...]
That shows the exact arguments rclone actually parsed. If --no-update-dir-modtime (or others) isn't in that list, that's the problem.
One aside: --no-update-modtime only affects file modtimes on identical files; it has no effect on directories, so it's not doing anything for this case.