kinda thought that but never used --track-renames until now. thanks for the cofirm.
well, not sure i see the issue.
i assume that --disable CaseInsensitive means that the operation should be case sensitive.
and windows has no issue renaming FILE.TXT to file.txt
And it successfully performs the casing-only rename from test.txt to TEST.txt.
Edit: Also tested a go application, with the rename operation that I think is doing the MoveFileEx above. It also works. Also tested with and without the \\?\ prefix that rclone normally uses, with no change.
as you were writing your post, i was writing my post just above.
we agree that windows has no issue renaming a file from test.txt to TEST.TXT
but i did the test from the command line.
dir /b
test.txt
ren test.txt TEST.TXT
dir /b
TEST.TXT
So the reference to source file TEST.TXT also matches a source file test.txt. This may/will lead to different issues.. E.g. my case 1 earlier that resulted in deletion of the destination file, when I ran:
What I think is happening:
The track-renames logic will find that C:\Temp\y\TEST.txt should be renamed to test.txt. But before doing the rename (move) operation, it checks if the result of that operation already exists and is in the way. It performs a os.stat operation on path C:\Temp\y\test.txt, and oops - that returns successfully the file info, even though it in reality is for C:\Temp\y\TEST.txt. Rclone then concludes it needs to delete C:\Temp\y\TEST.txt first, and then rename C:\Temp\y\test.txt to TEST.txt. Unfortunately C:\Temp\y\TEST.txt and C:\Temp\y\test.txt are the same file, so after deleting C:\Temp\y\TEST.txt to clear the path for rename, the rename operation fails with The system cannot find the file specified.