troubleshooting Question

Rename file to be the same as the folder it is in

Avatar of Lionel MM
Lionel MMFlag for United States of America asked on
Scripting LanguagesWindows BatchVB Script
20 Comments2 Solutions394 ViewsLast Modified:
I have a client who downloads file from the internet using uTorrent. Not sure how this works but as he does he creates folders to put the files into. The folders are named in the format he wants the files to be named. Example--he downloaded this file and it was created and named sample-nova.2011-09-28.xls. It is located in folder named "Sample Nova 2011-09-28". He wants the files to be renamed to mirror the name of the folder, so can we read the folder name and then use that to rename the file. There will be only one file of each file type in the folder, so there may be a .xls or a .pdf or both but never two of the same type in the same folder. Thanks.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 20 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros