Computing.Net > Forums > Disk Operating System > Searching Subdirectories

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.

Searching Subdirectories

Reply to Message Icon

Name: cjp12711
Date: December 21, 2003 at 14:05:44 Pacific
OS: Windows XP
CPU/Ram: Pentium 4/256 megs of ram
Comment:

Hello, I have run into a problem that should be easy to solve, but has completely stumped me. I am fairly new to DOS script writing. We have a program that runs and inserts files into multipl subdirectories on the C drive. I need to find a way to search for these *.jpg files in each subdirectory and move them to 1 single folder named c:\images. I am having trouble figuring out how to search subdirectories for these files.
For Example:

C:\folder1\image1.jpg
C:\folder2\image2.jpg
Both of these jpg files should be moved to c:\images.

Any help is greatly appreciated!

Thanks!
CJ




Sponsored Link
Ads by Google

Response Number 1
Name: Wengier
Date: December 21, 2003 at 14:22:47 Pacific
Reply:

Still this question:

You want a DOS script or a WinNT/2K/XP Console script? They are two different stories because they are usually very different.


0

Response Number 2
Name: cjp12711
Date: December 21, 2003 at 14:32:46 Pacific
Reply:

I can use either one - as long as it can copy the files from the subdirectories into the new one, I will use whatever is available. Thanks!


0

Response Number 3
Name: Wengier
Date: December 21, 2003 at 14:46:39 Pacific
Reply:

For a DOS script, you can try this:

DIR C:\*.JPG /A/B/S|LMOD /L* COPY [] C:\IMAGES


0

Response Number 4
Name: Wengier
Date: December 21, 2003 at 14:53:52 Pacific
Reply:

DIR C:\*.JPG /A/B/S|LMOD /L* COPY [] C:\IMAGES>>C:\COPYJPG.BAT

C:\COPYJPG.BAT

LMOD.COM is availabe from:
http://newdos.yginfo.net/upload/lmod.com


0

Response Number 5
Name: cjp12711
Date: December 21, 2003 at 15:34:35 Pacific
Reply:

Thanks for your help! I'm still a little confused though... What is lmod and what does it do?

What is in the bat file you specify above?


0

Related Posts

See More



Response Number 6
Name: cjp12711
Date: December 21, 2003 at 15:44:06 Pacific
Reply:

Ignore the bat file question... duh! But I'm still confused about lmod and what it does... This is something that I hope to use on multiple PC's, so being able to do it without additional programs/software would be preferable. Again, thank you so much for your help!


0

Response Number 7
Name: x86
Date: December 21, 2003 at 15:45:03 Pacific
Reply:

http://www.ss64.com/nt/


0

Response Number 8
Name: cjp12711
Date: December 21, 2003 at 16:01:33 Pacific
Reply:

I don't see anything about lmod here at that site


0

Sponsored Link
Ads by Google
Reply to Message Icon






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: Searching Subdirectories

search www.computing.net/answers/dos/search/11590.html

xcopy : bug or feauture ? www.computing.net/answers/dos/xcopy-bug-or-feauture-/13041.html

Dos Script to search for text www.computing.net/answers/dos/dos-script-to-search-for-text/13818.html