Computing.Net > Forums > Disk Operating System > Creating mini program in dos

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Creating mini program in dos

Reply to Message Icon

Name: Alex Appolni
Date: July 25, 2003 at 20:03:31 Pacific
OS: Windows XP professio
CPU/Ram: 512
Comment:

When I download music, movies, and software, they all go to a folder called "my shared folder". Within the "my shared folder" there are three folders called "movies" "music" and "software". I do this only for organization. I was wondering if, instead of manualy moving files into their correct folder, if there was a loop type command that i could run in DOS which would send all of a certain file type into it's correct folder. For example: all of the mp3's would go into the "music" folder... all of the .avi's would go into the "movies" folder... and all of the .zip files (software is usually zipped up) would go into the "software" folder. I know that in unix, the command that i would be looking for is the "foreach" command... i use this command at work a lot. I was just wondering if there was something like this in dos.

Thanks,
alex
brds85@yahoo.com



Sponsored Link
Ads by Google

Response Number 1
Name: Nathan
Date: July 25, 2003 at 20:31:07 Pacific
Reply:

This can be achieved very easily using wild cards and copy. I would use something like

copy "C:\my shared folder\*.mp3" "C:\my shared folder\music\"

this will take any file with the extension .mp3 into the music folder.



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Creating mini program in dos

how to create a directory in dos www.computing.net/answers/dos/how-to-create-a-directory-in-dos/11381.html

Create a directory in DOS with Mont www.computing.net/answers/dos/create-a-directory-in-dos-with-mont/16838.html

OPEN A PROGRAM IN DOS Version 5.1.2600 www.computing.net/answers/dos/open-a-program-in-dos-version-512600-/17007.html