Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Renaming Based on Location

Status
Not open for further replies.

Smoltz

Technical User
Apr 27, 2003
1
US
I looked around this website for some information on how to do batch renaming, and I found some helpful information, but I'm not knowledgeable enough to customize the script examples to my needs...

What I am trying to do is rename a file based on it's location in the tree and disregard it's given file name except for the extension.

Example...

\yada1\yada2\yada3\yada4.xxx

the script has to rename the file yada2-yada3.xxx

I'm only interested in two directories up worth of information.

I've assembled enough information to build the list of files to be changed using locate, but beyond that, I don't know what to do. Any help would be greatly appreciated.

Thanks,
Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top