SED - Need help removing characyers from filenames
I have hundreds of .zip N64 games. I want to remove certain characters from the filenames, but I'm terrible wihth SED and regular expressions. The files look like this:
Paperboy (U) [!].zip Paper Mario (U) [!].zip Penny Racers (U) [!].zip Perfect Dark (U) (V1.1) [!].zip PGAeurotour.zip Pilotwings64.zip Pokemon Puzzle League (U) [!].zip Pokemon Snap Station (U) [!].zip Pokemon Snap (U) [!].zip Pokemon Stadium 2 (U) [!].zip Pokemon Stadium (U) (V1.1) [!].zip Polaris SnoCross (U) [!].zip Powerpuff Girls, The - Chemical X-Traction (U) [!].zip Power Rangers - Lightspeed Rescue (U) [!].zip Premier Manager 64 (E) [!].zip I want to remove every instance of these characters from every filename, and remove the spaces. (U) [!] (E) (V1.1) Any help would be appreciated. |
Code:
for file in * ; do # will act on all files in the working dir It only assumes this. |
Easy enough to insure .zip by adding to the wildcard in the for loop:
Code:
for file in *.zip ; do As a precaution to test the script, simply place an echo prior to mv and you will see a print out of what will happen once removed :) |
All times are GMT -5. The time now is 07:03 AM. |