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
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.
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
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
Summary: go to Start-> Run -> type in "cmd". from the command prompt type " cd \ " then type this: C:\> dir [file_name] /s replace [file_name] with whatever file you want. the /s mean search subdirectories. if...
Summary: Hi, Was using XCOPY to copy some files, and I noted some weird stuff. Looks like a bug to me, but maybe I am wrong: Here is what I want to do: copy a certain file, which is located in different subdir...
Summary: bunder is right! - Horst has some great stuff, all FREEWARE. In case you're wondering before you hit the old Right-click > Open in New Window, Here's what you'll find there: WBAT Dialog boxes with me...