?
Solved

copy files

Posted on 2006-04-13
10
Medium Priority
?
396 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:dmctighe
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 5

Expert Comment

by:Intense_Angel
ID: 16449246
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
 
LVL 13

Expert Comment

by:haim96
ID: 16449262
you can use the XCOPY command.
this will copy the files with the folder structure
0
 
LVL 5

Expert Comment

by:Intense_Angel
ID: 16449295
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 13

Accepted Solution

by:
haim96 earned 1000 total points
ID: 16449320
the command is :
xcopy source\*.jpg  /s  destinetion\
0
 
LVL 24

Expert Comment

by:Mohammed Hamada
ID: 16449380
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
 
LVL 13

Expert Comment

by:haim96
ID: 16449409
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
 
LVL 2

Expert Comment

by:Abulhallaj
ID: 16449976
Try to use "Total Commander" it's free to use and have anything you want. That's a wonderfull software.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 16451434
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
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 16451446
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
 
LVL 13

Expert Comment

by:haim96
ID: 16452369
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question