Eric Windisch on Mon, 25 Oct 1999 22:45:20 -0400 (EDT) |
Eric Windisch wrote: > > Although this isn't much, some people have requested it on irc. So I > decided > to share it with you guys as well: > > #!/usr/bin/perl -w > foreach $_ (A..Z) { > mkdir("$_", 444); > system("mv $_* $_"); > system("mv \l$_* \u$_"); > } > > If you don't know perl and/or haven't figured out what it does: it makes > directories named A, B, C, etc.. and copies all files in the current > directory > to it's alphabetical match. Good for catagorizing those images your mom > doesn't want you to see, those legal mp3's, etc :) > Something I forgot to mention, as it is quite obvious in the code... the original file permisions are not kept, so changing them afterwards (or fixing the script) would be a good idea. right now it makes all the files a+r-wx (444) -- Eric Windisch _______________________________________________ Plug maillist - Plug@lists.nothinbut.net http://lists.nothinbut.net/mail/listinfo/plug
|
|