How to copy folders. Am I really this stupid?
April 1, 2006 1:30 PM   Subscribe

I need to move many files in different subfolders to one folder, thousands of images to be precise.

The files are in dozens of folders like this:


etc... so one folder for each day as it were. No file has the same name. What's the easy way to copy all the files from their respective subfolder to a single new folder on another disk? I would prefer to do this in DOS to avoid having to manually copy the files from each folder. This should be an easy task, but I really can't figure out how to do this. I searched AskMe and googled but I found nothing for Win XP.
posted by fondle to Computers & Internet (7 answers total) 1 user marked this as a favorite
Can't you just do a WinXP search (F3 shortcut) in explorer with c:\pictures set as the "Look In" field and *.jpg as the "Search for files" field? After it populates, drag n drop (or whatever) into your new folder? As far as I know, search should recurse through subfolders as well.
posted by pooya at 1:56 PM on April 1, 2006

Yes yes thank you very much! There had to be an easy way.
posted by fondle at 2:02 PM on April 1, 2006

I'm sure there are a hundred ways to do it and probably some easy ones, too.

Unfortunately, all I can think of is writing a script or zipping all the folders up and unzipping the zip so that unzip ignores the directory structure.
posted by callmejay at 2:03 PM on April 1, 2006

Post-preview, never mind. :-)
posted by callmejay at 2:04 PM on April 1, 2006

You already have an answer but you can also do this in windows command prompt:

for /r C:\pictures\ %i in (*.jpg) do move "%i" c:\new_directory

Usually I test these kinds of things first with

for /r C:\pictures\ %i in (*.jpg) do echo not actually moving file: "%i"

This works on NT, windows 2000, and windows XP, but not on 95, 98, and ME, I believe. for /? from the command prompt will tell you more info.
posted by aubilenon at 2:33 PM on April 1, 2006

Previous similar question
posted by Sharcho at 3:23 PM on April 1, 2006

aubilenon, I did not know that command, thanks! :)
posted by fondle at 5:20 PM on April 1, 2006

« Older If I have a good mattress and ...   |  I have been scouring the web f... Newer »
This thread is closed to new comments.