I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-02-05 19:06:30-08 by pdi
Rename using path's last dirname as prefix

I've been trying to sort this one out without much success and its likely I'm missing something. I'd appreciate any help.

There are some photos in a directory C:\path\to\dirname. Is there any way to rename the photos using as prefix the name of the last directory in the path? The filenames will be of the form DIRNAME_rest_of_filename.ext. Using the command below was not successful:

exiftool "-filename=%d_%2c.%e" dirname

Many thanks in advance.

pdi

Direct Responses: 4244 | Write a response