Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Batch renaming in suse

Name: Anonymous 2009-06-17 16:55

So, I downloaded a torrent of flacs and I want to copy them over to a windows comp, but they all have colons in the filenames, and I need to remove that from all the filenames to get them over to windows. I could do it manually but there's about 150 files and it would take a while. So is there an easier way to remove one character from a series of files without heavy scripting?

Name: Anonymous 2009-06-17 17:13

nope

Name: Anonymous 2009-06-17 18:48

perl -e 'for $old (<*>) { $new = $old; $new =~ s/;//g; rename($old, $new) }'

Name: Anonymous 2009-06-17 18:50

>>3
oops, you said colon, change s/;//g -> s/://g

Name: Anonymous 2009-06-18 12:33

for f in *; do mv $f `echo $f | tr -d :`; done

Fuck your Perl.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List