copy files

Over the last few years I have been allowing my users to store jpg's in any directory they want on our server(windows 2003).  Now I have a problem with storage and am going to implement a policy to only store jpg's in one directory.  I am also going to use some software that will restrict putting files in the directory.  My question is this:  I am wondering if there is a way to copy all the JPG's from one directory to another and keep the directory structure(ie I have a folder called c:\server\project2003\"project number"  there is about 200 "project number" folders - each with a bunch of JPG's in them). When I copy all these files to a single directory I would like it to copy the directory structure also so I know which project the JPG is for.  Any ideas??


thanks
derek
dmctigheAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Intense_AngelCommented:
I like to use this program, you can sort with a wild card *.jpg and then duplicate to another directory.  Works great.

http://www.foldermatch.com/
0
haim96Commented:
you can use the XCOPY command.
this will copy the files with the folder structure
0
Intense_AngelCommented:
haim96....you tailing me today? :-)  If he uses xcopy won't that copy all other files withing the directories also?  I am assuming that others exist because he didn't copy and paste.  
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

haim96Commented:
the command is :
xcopy source\*.jpg  /s  destinetion\
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mohammed HamadaSenior IT ConsultantCommented:
Hello Dmctighe..

Enter to each folder, select all the JPG's and right click on one of them while they are selected...
For example If you have pictures that seriesed as the following DSC06315 - DSC06316 .... 17 ... 100 in folder one.

And you have another folder that has the pics -- GSC06315 ... GSC06999...

To Copy both JPGs in both folders to one Directory, Select all in the first folder, right click one of them and rename it " Don't delete the original name, Type After the original Name
" Folder one " exculding quotes... this will rename the whole JPGs in this folder to  DSC06315 - Folder One .... DSC0617 - Folder ONe.... etc

The same procedures should be done to the next done, then you can copy all of them to the same directory and see which belong to which folder.

Hope This helps.
0
haim96Commented:
angel... if he will use wild card it will copy only JPG files.
best practice will be to create target folder like c:\jpgfolder
then run :
xcopy d:\*.jpg /s c:\jpgfolder\

note that the target folder should be on difrent drive from the one you copy from.
after that you can move the target folder to what ever you want to.
0
AbulhallajCommented:
Try to use "Total Commander" it's free to use and have anything you want. That's a wonderfull software.
0
scrathcyboyCommented:
use xxcopy (that is xxcopy, not xcopy), it allows intermediate wildcards in the path.

xxcopy c:\server\project2003\*\*.jpg  D:\destination\*\ /s/a

That will xxcopy in a single command ALL the project directories to the destination and clone the project directories under that new path, copying only the JPGs, in my command line example.  See www.xxcopy.com
0
scrathcyboyCommented:
of course, you could also use xcopy if you didnt want to be selective in files -

xcopy c:\server\project2003\  D:\newdir\ /s/c/k

it will do the same thing, but you cannot select only a certain file type or structure under the *.
0
haim96Commented:
scrathcyboy , yes he can !
and i have tested my self before post that !
and sine he want to keep folder structure all he need is :
xcopy d:\*.jpg /s c:\targetfolder\
or
xcopy d:\server\*.jpg /s c:\jpgfolder\

the command search the folder for jpg files
and copy them with folder structure,no other files will be copy !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.