Scripting gurus in dos! Need your aid.


Diamond Member
Jan 15, 2004
I have a list of files. Ultimately, I want to move each of those files into a folder with the same name. I'm trying to challenge myself by learning this because I know it'll be useful for other things at work.

Background: For Vista Media Center I have movies, and to add its cover, I need to put each movie into its own folder, along with a jpg that has the cover of the movie.

C:/Movies/Movie1.avi... Movie2.avi, Movie3.avi

So far i've dumped a directory list in cmd, and am using Textpad to try and edit it... it looks like this:

12/20/2007 12:13 AM 1,057 Movie1.avi
12/20/2007 12:13 AM 1,057 Movie2.avi
12/20/2007 12:13 AM 1,057 Movie3.avi

Now obviously with this many files I could manually do all of this, but the point of it is that I want to "automate" it if I had many many more.

I'm guessing what I think I should do is try to do some stuff with regular expressions (i'm not that familiar with it), or macros (not that familiar either). Any suggestions?


Golden Member
Dec 30, 2001
Without giving you too much help...

dir /b will get rid of the extra crap

You could probably do this easily with vbscript.

good luck! :)