I have a bunch of mp3 files that iTunes copied over adding a numeric extension, that I want to remove. Is there a Mac bash command that will allow me to do that? Here is what the directory looks like. The files in question have 2 digits, and a space.
Asked
Active
Viewed 466 times
-1
2 Answers
1
Looks like a duplicate of:
remove numbers from filenames in Mac OS X
Modify the answer from there:
for name in *; do mv -v "$name" "${name#[0-9]* }"; done
I would first move 1 or 2 files into their own directory and try running that. If you get the desired results, then go into your main music directory and run it again.
kamil234
- 176
0
There is rename command in linux which you can use.
rename 's/^[0-9][0-9] //' *.mp3
The above command matched all the .mp3 files starting with two numbers followed by space. Check this link or man page for more details. I'm not sure if this command is available for mac.
Nitish
- 103
-
The question is for Mac and maybe
renameis well defined there (I cannot tell). In general in *nix there are many similar programs andrenamein one distro may be different thanrenamein another distro. – Kamil Maciorowski Dec 30 '19 at 20:09

vidir. You may get answers tailored to your specific request but in general I find the tool quite useful for renaming. – Kamil Maciorowski Dec 30 '19 at 18:44