1.

Solve : Duplicate and rename single file in a large number of folders?

Answer»

In my music library, I have organized my folders in the FORMAT: Artist/Album/01 song title.mp3. Within each Album, I have a folder.jpg for the album art. I am upgrading my media server in my house, and the new system wants to have both a folder.jpg and cover.jpg in each album folder. My collection is fairly large (50,000 tracks), so manually duplicating each folder.jpg file and renaming it cover.jpg is impractical.

Is there a SIMPLE way to search through the NAS folder containing the music and wherever it FINDS a folder.jpg file, to copy it and save as cover.jpg?

Thanks in advance!If the NAS drive is mapped as a drive letter, open a command prompt in the root of that drive, and type (or PASTE) this

for /F "delims=" %A in ('dir /s /b folder.jpg') do copy "%~dpnxA" "%~dpA\cover.jpg"

and hit Enter

or...

place this batch file in the root and execute it

@echo off
for /f "delims=" %%A in ('dir /s /b folder.jpg') do (
echo Copying %%~dpnxA
copy "%%~dpnxA" "%%~dpA\cover.jpg"
)
echo.
echo Done
Pause





Discussion

No Comment Found