Associate
- Joined
- 21 May 2003
- Posts
- 1,008
Hi. I'm trying to organise a folder full of movies. each movie has about three files, e.g. movie.avi, movie.nfo, and movie-fanart.jpg, and i want a bat file to copy all these into individual folders, in this case called "movie".
I've found something that nearly works:
@Echo off
for %%a in (*.*) do (
md "%%~na" 2>nul
move "%%a" "%%~na"
)
However this seperates the movie-fanart.jpg file and puts it in it's own folder.
How can I change the above bat file to ignore all "-fanart" strings?
I've found something that nearly works:
@Echo off
for %%a in (*.*) do (
md "%%~na" 2>nul
move "%%a" "%%~na"
)
However this seperates the movie-fanart.jpg file and puts it in it's own folder.
How can I change the above bat file to ignore all "-fanart" strings?