VBScript or Batch to rename files based on the name of the folder they are in.
Posted on 2007-11-29
Please keep in mind I am a complete scripting n00b. This could be a batch file or vbs script. I am open to other suggestions as well.
We are restoring an old database manually. There are 500 or so folders in the directory listed below.
Each folder is named based on the name of the database entry.
Each of these folders has a file in it called "doc.zip".
Please note that while these zip files are all named the same thing, they contain very different data.
Each zip file needs to be named based on the folder it is in and moved to another directory (D:\Data\XactRestored\Done\)
would be renamed to:
then moved to:
The final result would look like this: