I’m now working on Mac Mountain Lion. I have a folder with about one thousand files whose names are like these:
file_1.png
file_2.png
file_3.png
file_4, word_abc.png
file_5.png
file_6, word_xyz.png
...
file_n.png
Now I want to select all the files with , and remove everything between , and .png including , so that the files appear as:
file_1.png
file_2.png
file_3.png
file_4.png
file_5.png
file_6.png
...
file_n.png
I have no idea what and how to do but manually rename these files. I wonder if there are any “automatic” ways to deal with this problem. Can you give a little help? Thanks a lot.
Here’s one way using
sed: