I have a GB's worth of music on my HDD that was formatted with EXT4. I want to move these files to a FAT formatted HDD partition. However, I can't move most of my files because they have ":" in the names (For example, "Act 2: ....." for operas). Is there a way with command line to rename all of my files from "XXXX:XXXX" to "XXXX-XXXX"?
If all your files are in a single directory, try:
(where * can be changed to something more restrictive if you'd like)
If you have many files in a directory tree, try this from the base of the tree:
You can add the option
Im not at my linux machine right now so I can only give rough information.
Linux has a commandline utility called
Just to be safe, do it in small batches and/or first test with the simulation (rename has a flag which just gives you the oldname and new name of the file without actually renaming - use this to verify first)
This is a solution in python which handles the case where the files are not necessarily in the same directory.
Warning: Do test on a small sample before risking an entire GB of music.
Details: Renaming is performed from the innermost files outward.