FixFiles is an elixir app designed for a one-time use to convert a large (roughly 10TB and 1M files) local store to be compliant with egnyte storage.
Requirements:
- Fix both filenames and directories
- Convert any instance of the characters \ / " : < > | * ? with a hyphen.
- Trim leading or trailing spaces
- When fixing a file or directory name causes it to collide with an existing name, append -DUP-NNNN where NNNN is a four character random string drawn from the letters A-Z and number 0-9.
- create a text change log
- has to be robust:
- don't mess up the files!
- don't miss anything!
- work well so that i don't have to baby the script, probably specifically work over enormous directory trees. i.e. don't run out of memory.
- clone this repo
- install elixir (i'm runnign 1.14.2 w/ erlang 25.1)
- mix compile
- iex -S mix
- from iex, FixFiles.list_all("your/relative/or/absolute/directory")
That's it!