Hi all ! I am not quite sure if this is the right forum to post this topic! but anyway, let me post my question!
I have a folder, pics. In pics, i have some 20 folders with 100's of photos in each folder. I want to copy these photos in 20 folders to a single folder, is it possible ? in dos probably ?
Thanks !
Copy files recursively ?
Page 1 of 111 Replies - 8088 Views - Last Post: 03 December 2007 - 08:02 PM
Replies To: Copy files recursively ?
#2
Re: Copy files recursively ?
Posted 16 October 2007 - 06:08 AM
This is the wrong forum. You should have posted in Computer support. Wait for a moderator to move it.
#3
Re: Copy files recursively ?
Posted 16 October 2007 - 06:31 AM
You could write one batch file with all your commands and execute it at once. Im not sure if there's any other way. Possibly someone has a better solution.
Hope this helps
.
Hope this helps
#4
Re: Copy files recursively ?
Posted 16 October 2007 - 09:17 AM
Of course, there are plenty of other ways. You can create a small app (Java, C++, VB...) that does it for you and make it use recursive functions/methods. If you need some code just post in a forum!
#5
Re: Copy files recursively ?
Posted 16 October 2007 - 11:05 AM
Quote
Of course, there are plenty
My Bad. I was under the impression that he was looking for DOS commands.
#6
Re: Copy files recursively ?
Posted 16 October 2007 - 11:13 AM
If all of the folders with the pics are in one single parent directory, you might try this...
For a less technologically-snazzy way, go to search (I'm just assuming this is WinXP). Click search for pictures etc, then click advanced options. Type the path of the parent directory into the "Look in" field, and *.jpg or *.jpeg (again, just assuming here) in the file name field.
The search results will be a list of all the files across all of the directories. Highlight and drag or copy/paste into the new directory.
-jjh
For a less technologically-snazzy way, go to search (I'm just assuming this is WinXP). Click search for pictures etc, then click advanced options. Type the path of the parent directory into the "Look in" field, and *.jpg or *.jpeg (again, just assuming here) in the file name field.
The search results will be a list of all the files across all of the directories. Highlight and drag or copy/paste into the new directory.
-jjh
#7
Re: Copy files recursively ?
Posted 16 October 2007 - 11:15 AM
jjhaag, on 16 Oct, 2007 - 12:13 PM, said:
If all of the folders with the pics are in one single parent directory, you might try this...
For a less technologically-snazzy way, go to search (I'm just assuming this is WinXP). Click search for pictures etc, then click advanced options. Type the path of the parent directory into the "Look in" field, and *.jpg or *.jpeg (again, just assuming here) in the file name field.
The search results will be a list of all the files across all of the directories. Highlight and drag or copy/paste into the new directory.
-jjh
For a less technologically-snazzy way, go to search (I'm just assuming this is WinXP). Click search for pictures etc, then click advanced options. Type the path of the parent directory into the "Look in" field, and *.jpg or *.jpeg (again, just assuming here) in the file name field.
The search results will be a list of all the files across all of the directories. Highlight and drag or copy/paste into the new directory.
-jjh
That's the PERFECT way to do that... man, wish I had thought of it
#8
Re: Copy files recursively ?
Posted 16 October 2007 - 11:16 AM
Me too
. Sometimes the most complicated problems have the simplest solutions!!
#9
Re: Copy files recursively ?
Posted 16 October 2007 - 11:47 AM
Louisda16th, on 16 Oct, 2007 - 12:16 PM, said:
Me too
. Sometimes the most complicated problems have the simplest solutions!! 
Thanks - hope it helps a few of you.
I ftp'ed a bunch of GIS data a while back and needed to get it all organized...I mean, it's fine having to manually go and move a couple of hundred pics, but we're talking about 30000+ tifs, shapefiles, xml metadata files, etc, in maybe 300 different directories, all of them nested. That kind of thing REALLY makes you search for something effective.
-jjh
#10
Re: Copy files recursively ?
Posted 16 October 2007 - 02:26 PM
It's a one-liner, if you're on a unix box:
Of course, make sure you've got the NewPics folder already made. Or whatever you want to call it. And you run it from inside the directory that has all the old pics.
cp */* ~/NewPics/
Of course, make sure you've got the NewPics folder already made. Or whatever you want to call it. And you run it from inside the directory that has all the old pics.
#11
Re: Copy files recursively ?
Posted 16 October 2007 - 11:21 PM
Wow!
thank you all for ur time and response ! Psst..i wasnt thinking of writing a program to do the work for me! but the "searching method" will surely work! thanks again!
Cheers!
Cheers!
#12
Re: Copy files recursively ?
Posted 03 December 2007 - 08:02 PM
nav33n, on 16 Oct, 2007 - 11:21 PM, said:
Wow!
thank you all for ur time and response ! Psst..i wasnt thinking of writing a program to do the work for me! but the "searching method" will surely work! thanks again!
Cheers!
Cheers!
I do have a dos version (batch file) for this simple task.
I got it from searching 7zip archiving in dos command. And I simplified it to suit the task. The credit should go to the original poster.
@echo off rem set you folder and target folders here set _folder_in="D:\source\" set _folder_out="D:\target\" rem set the desired extensions inside the bracket like below for /r %_folder_in% %%g in (*.zip *.rar *.7z) do call :process "%%g" pause goto :eof :process set _fullfile=%~f1 COPY %_fullfile% %_folder_out% rem you can modify COPY to other dos commands such as MOVE or DELETE etc. goto :eof
my 1st post , hope it helps
This post has been edited by teron83xl: 03 December 2007 - 08:04 PM
Page 1 of 1

New Topic/Question
This topic is locked



MultiQuote






|