I have about 300 zip file and i want to extract their image in folder where the zip is exist and some of them have 2 or 3 pictures then change their name to zip's name in zip's name folder
Before:
C:\zips\Myfile.Zip\word\media\image.Png
C:\zips\Myfile.Zip\word\media\image1.Png
C:\zips\hdh\Product.Zip\word\media\image.png
C:\zips\hdh\Product.Zip\word\media\image1.png
After:
C:\zips\Myfile\myfile.Png
C:\Myfile\myfile1.png
C:\zips\hdh\Product\product.Png
C:\zips\hdh\Product\product1.png
My code to extract all the image files in zip's folder name:
for /R %%I in ("*. Zip") do (
7z e "%%~fI" "word/media/*" -o"%%~dpnI"
)
My batch code to rename all image's name to direction where they are, it works just for the zips that have just one image, if a zip file have more than one picture, it just changes a image file not other images and i want to change other images to "folder's name"1.png and.... :
For /r %%F in (*.jpeg) do @for %%A in ("%%F\°°") do ren "%%F" "%%~nxA.jpeg"
For /r %%F in (*.png) do @for %%A in ("%%F\°°") do ren "%%F" "%%~nxA.png"