1.

Solve : Need help with a Batch file to copy and rename files?

Answer»

I have a large quantity of movies that are in separate folders. Each folder has a FILE named 'moviename-poster.jpg'. I would like to make a copy of that file and rename it 'folder.jpg' in each of those folders. I hope there is a way to do so that doesn't require that I DROP the batch file in each folder and run it. I would prefer to be ABLE to run the batch file from the root folder and have it go into each movie folder and do the copy/rename PORTION for me. Thanks in advance for any assistance.Place script in root folder and try script. Remove ECHO if happy.

@echo off
for /f "delims=" %%F in ('dir /b /s *-poster.jpg') do Echo COPY "%%~dpnxF" "%%~dpF\folder.jpg"
echo Done
Pause






Discussion

No Comment Found