I have a bunch of zip files in a folder. Each zip file has a file in it named
exp_1.txt. I would like to unzip each zip file and rename the extracted file from each zip file to what the zip file was named.
The zip files names don't follow any pattern or date structure, but are all different. I have figured out how to get the
exp_1.txt file extracted into the same directory as the zip file, but can't figure out the renaming of
exp_1.txt to match what the zip file it was extracted from is named.
Once again in fewer words: from
TuesdayReport.zip I want to extract the only file
exp_1.txt and rename it to
TuesdayReport.txt in the same directory as
Currently I'm using
7z x to extract the file to the same directory the zip file is located in. I would prefer to be able to run this from a batch file.