My question is very similar to:
Rename extracted file based on zip file in Batch
I have 470 .zip files which each contain two files (.mp3 & .cdg) - they are karaoke files.
The ZIP files are cleanly named (Abba - Money Money Money.zip), however the contents, of the ZIP file need to be renamed (e.g FIK001ABBA_02_-ABBA-_MONEY_MONEY_MONEY.mp3).
So, I would like the batch file to do the following:
- Extract the files
- Rename the contents, of the zip file to the zip file name.
- e.g:
- FIK001ABBA_02_-ABBA-_MONEY_MONEY_MONEY.mp3
- FIK001ABBA_02_-ABBA-_MONEY_MONEY_MONEY.cdg
- renamed to
- Abba - Money Money Money.mp3
- Abba - Money Money Money.cdg
- The files are then added back into the zip file
I've looked over the similar posting above, however, it talks about unzipping *.7z my files are *.Zip. Please explain :-)
Here is the code:
md textfiles
for %%f in (*.zip) do (
winzip -v "%%f"
move *.txt textfiles\%%~nf.txt
)
xcopy textfiles\*.txt originalfolder
rd textfiles /s /q