[SLUG] File Renaming

From: Frank Roberts - SOTL (sotl155360@earthlink.net)
Date: Fri Aug 20 2004 - 14:28:04 EDT


Hi All

I have approximately 2000 files in approximately 200 directories I would like
to rename.

To me the easies to explain this is by example.

----------------------
Currently:
The first directory's name be XXX-001 with files in the directory are named
001.jpg to 020.jpg

The second directory's name be XXX-002 with files in the directory are named
001.jpg to 020.jpg

And so on for 200 directories.

----------------------
What I would like to rename the files as:

The first directory's name remain XXX-001 but the file names in the directory
to change to XXX-001-001.jpg to XXX-001-020.jpg

The second directory's name remain XXX-002 but the file names in the directory
to change to XXX-002-001.jpg to XXX-002-020.jpg

And so on for 200 directories.

----------------------
Each directory does not have the same number of files in it.

Suggestions on how to do this would be appreciated.

Thanks
Frank

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:03:41 EDT