Created
March 14, 2023 15:33
-
-
Save HT-7/8ed1ee6e0630f772d1393a2e9ffdecab to your computer and use it in GitHub Desktop.
This Linux command replaces characters of file names that Windows considers invalid with an underscore, to make the files accessible and manageable on Windows again. Renamed files are logged to record their original names.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rename -v "s/(:|\"|\*|\\|\||\&|\?|\%|\<|\>)/_/g" .* * |tee -a renamed_files.$(date +%Y%m%d%H%M%S).log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment