I have a directory with files and other directories inside. I want to normalize all file paths inside it to lower-case. By this I mean that:
Whenever there are two paths ./A/b/d
and /a/b/c
under the directory (that I call .
). Then A
and a
should be merged, with the name a
. This can occur at any level.
Suppose that there are no file repetitions. That is, if all paths are converted to lowercase, there will be no file conflicts (but many directories will have to be merged).
How can I do this?
In case you are wondering, I am trying to copy a directory from linux to Mac (which is case-insensitive).