Skip to content

New --fix-case flag to workaround case insensitive filesystem (macOS/Windows) #4854

Closed

Description

@vicmarto

When syncing to a case sensitive file system, it would be nice if rclone could rename files/directories to match the case on the source.

Currently this isn't possible - rclone views HELLO.txt and hello.txt on a case insensitive file system as being the same file and skips over them.

This could be controlled with a new flag --fix-case which would only be supported on backends which implemented the Move and maybe MoveDir optional methods.

--fix-case would likely rename the source to the same name as the destination if it was different. This would mean it would make the unicode normalisation the same also.

See the forum for more info: https://forum.rclone.org/t/force-rclone-to-respect-case/20794/5

Activity

  1. added this to the Help Wanted milestone on Dec 9, 2020
  2. ncw commented on Dec 9, 2020

    @ncw
    Member

    To implement this it would need some code to check to see if the leaf of the destination is the same as that found and to Move it if not

    } else {

    Might need to check all case insensitive file systems can actually rename HELLO.txt to hello.txt- this might need a new integration test.

  3. ivandeex commented on Nov 19, 2021

    @ivandeex
    Member
  4. bdkjones commented on Sep 3, 2022

    @bdkjones

    This would be a good addition, but I think the original post mixed up the priority: the destination name should be changed to match the case of the source name, not the other way around. (The source filename should be the source-of-truth.)

    Even though FILE.txt and file.txt are the same file on macOS, rclone should preserve the casing during syncs-otherwise, we're not really "cloning" the file because information is lost. That loss might seem trivial, but it's still a loss.

  5. TitanicKiwi commented on Apr 27, 2023

    @TitanicKiwi

    I also have updated a bunch of files and folder cases. (I have capitalized a lot of stuff)
    It would be great if rclone could fix the cases on the destination as well.

  6. edgeyyzhang commented on Jun 9, 2023

    @edgeyyzhang

    This addition would be useful. Any updates on this?

  7. nielash commented on Oct 9, 2023

    @nielash
    Contributor

    This addition would be useful. Any updates on this?

    Yes -- I've opened a PR 🙂 #7356

  8. 9 remaining items

  9. added a commit that references this issue on Jan 26, 2024
    11afc3d
  10. added a commit that references this issue on Jul 20, 2026
    f939e05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions