in reply to renaming files

This should do the trick for you, and should be cross platform as well (you'll all let me know won't you? ;)

#!perl -w use File::Copy; while (defined(my $filename = <*.tmb>)) { my $filename_2 = substr($filename,0,length($filename)-4)."t.jpg"; move($filename,$filename_2); }

personally I would use "_t.jpg" as opposed to "t.jpg" simply because I find it easier to read "pic_t.jpg" over "pict.jpg", but that's just my opinion ;)

ryddler

Replies are listed 'Best First'.
Re: Re: renaming files
by joecamel (Hermit) on Jan 04, 2001 at 12:35 UTC
    Depends on if you want to group your files by type (thumb|full) or picture name. I personally put these kind of indicators in front of the filename, like "th_filename.ext", or "t_filename.ext" so that they are grouped by type.

    Even if they end up residing in different directories, it's easier on the eyes.

    joecamel