I have a batch script which unzip and renames each file.
Unfortunately I now need to keep the filename of the zip file it came from.
Example Jazz1.zip now unzips and the outcoming text file becomes 1.Jazz1.zip.txt.
So I want %%F to become %%F - 4- characters.
Unfortunately I want it to be Jazz1.txt.
::Setup the stage... SETLOCAL ENABLEDELAYEDEXPANSION SET folder=C:\P\DataSource2_W SET count=1 ::Action CD "%folder%" FOR %%F IN ("*.zip") DO ( "C:\Program Files (x86)\WinZip\wzunzip" %%F MOVE *.txt "C:\P\DataSource2_W\TextFiles\!count!%%F.txt" SET /a count=!count!+1 ) ENDLOCAL