Script to trawl directory structure and copy files

I'm pretty sure you can do this from scanning the command reference but I'm not sure how to do it myself :slight_smile:

I'm looking for a script to basically fix an mp3 directory structure from the abuse of WMP, which regularly decides to change all my Folder.jpg images from 500x500 to 200x200 (whether they are read only or not it seems) :open_mouth:

As well as Folder.jpg I also have a copy of the album art named .jpg, which always uses the same name as the directory the album is in. E.g.

Rock\Artist A\Album ABC\Album ABC.jpg
Pop\Artist B\Album 123\Album 123.jpg

The folder depth varies, but the end node album directory and image naming convention is the same.

Is there a way to trawl the directory tree and wherever it finds a .jpg that has exactly the same name as it's parent directory, make a copy called Folder.jpg as RO and overwrite the any existing file?

Thanks :slight_smile:
Jon

You could find all the JPG files below a certain starting point, and then fairly easily duplicate them to Folder.jpg in the same respective directories.

That'd work if the album folders don't also have other JPG files in them.

If they do, it'd probably require some VBScript or similar which is a bit more complex.