Google Answers Logo
View Question
 
Q: How do I extract a list of images from a folder with 1000s of images? ( No Answer,   7 Comments )
Question  
Subject: How do I extract a list of images from a folder with 1000s of images?
Category: Computers > Operating Systems
Asked by: jpbischke-ga
List Price: $20.00
Posted: 17 Sep 2006 17:53 PDT
Expires: 17 Oct 2006 17:53 PDT
Question ID: 766168
I have a text list of image names and I want to use this list to
selectively extract images from a folder which has 1000s of images.
I'm using Windows XP. Obviously I don't want to spend hours searching
and copying the individual files. Does anyone know of an easy way to
do this?
Answer  
There is no answer at this time.

Comments  
Subject: Re: How do I extract a list of images from a folder with 1000s of images?
From: frankcorrao-ga on 17 Sep 2006 20:34 PDT
 
I'm sure this is possible with a simple batch script, or at worse,
some vb script.  I don't know the windows syntax off the top of my
head.  I'm sure someone will post a suitable answer.  However, if you
want to download cygwin for linux-like environment within windows, you
could use this very simple script:
#!/bin/bash
IMG_LIST=whatever #put name of file that has the image names
IMG_DIR=whatever #put the name of the base directory that has the images
IMG_DEST=whatever #put the name of the directory you want to copy them to
for f in $(cat $IMG_LIST); 
do
find $IMG_DIR -name $f -exec cp '{}' $IMG_DEST \;
done

# i have not tested this but it should work
Subject: Re: How do I extract a list of images from a folder with 1000s of images?
From: cederigo-ga on 20 Sep 2006 04:42 PDT
 
Hi, i wrote a simple java application.
i can e-mail it to you if you want.

cheers 
 CÚdric
Subject: Re: How do I extract a list of images from a folder with 1000s of images?
From: deepeshdeomurari-ga on 20 Sep 2006 07:15 PDT
 
Hi,
        EASIEST WAY ... NO PROGRAM ... NOTHING... JUST A TRICK....
   its very easy.. just copy paste the list in Find Files or Folder(if
you have'nt seperated file listing by newline character) then search
in ur desired folder.
If u have used new line for seperating the list.. then in Linux/Unix u
can easily seperate it, In windows do the following
1 . Copy the content of the file
2. Open the Microsoft word
3. Now paste the content in document
4. go to Edit->Replace 
now in Find what , copy paste the content under the following quotes "^p" 
In replace with you should use One space(By pressing spacebar once) or
, whichever suites you
Now click on replace all
{If Zero changes occurs: Check following
1. Don't give space after ^p
2. If no space is given and no replacement show try ^l instead of ^p
Actually
^p-> is the paragraph marker
^l -> is the new line marker.

again copy the matter go to find and paste at files or folders and
select your desired folder and then click on search.
Let me know if this is the answer..
Subject: Re: How do I extract a list of images from a folder with 1000s of images?
From: deepeshdeomurari-ga on 20 Sep 2006 22:27 PDT
 
GOOD ALTERNATIVE OF THE PREVIOUS ONE: THIS IS SAFE AND MORE EASY
[The previous comment have some problems, because it binds with limit
of windows XP search.]
REPEAT THE STEPS OF THE PREVIOUS COMMENT but change only one thing 
in Replace Box You should type the directory name in which that files contents
e.g. if the directory is c:\imagelisting
then in Replace type
copy c:\imageslisting\
[No Space at all]
Now go to windows command prompt
make the directory where you want to put result
say cd\
md mylist
cd mylist
now select the content of word document
and right click on the command prompt(if not works with one time try
pressing two time)
then one by one your command works
as an alternative the easy way is to save your file as batch file in
ur newly created folder(i.e. mylist) ( with .bat extension)
Now at command prompt only you have to right the name of that file
its very simple

Another alternative way is 

 To download a freeware Command line search utlity.
Another way is writing the program for the same
for this you can check out the existing File Copy program in java

http://schmidt.devlib.org/java/copy-file.html#source
Feel free to contact me if not works on deepesh_deomurari@fastmail.fm
Subject: Example of previous comment
From: deepeshdeomurari-ga on 20 Sep 2006 22:37 PDT
 
lets open a file in word
filelist.txt
Now at Find Type : ^p
Now at Replace Type : ^pCopy c:\imagehost\
[Assuming imagehost is the source directory]
Now delete the last repeated c:\imagehost\
now save the file 
by going to the destination path
e.g c:\myimages\copymyfiles.bat
[Assuming myimages is the destination directory]
now go to command prompt
cd \myimages
now type
copymyfiles.bat
I have tried this solution
[REMEMBER BEFORE ANY EXPERIMENTS ALWAYS MAKE A BACKUP]
Subject: Re: How do I extract a list of images from a folder with 1000s of images?
From: sriramchandrk-ga on 28 Sep 2006 05:59 PDT
 
Hi,

This is answer but the answer link doesnt work from my account :(

copy and paste the command in cmd prompt (Start -> Run -> cmd <enter>)

del d:\test & ((for /F %f in ('type r.txt') do dir d:\ /b /s | find
"%f") |find /v "find") > f.txt & for /F %d in ('type f.txt') do copy
/Y %d d:\test

1. Before running the above line create a directory named test in d:
2. save the filenames in d:\r.txt
3. The above command searches only d:\; if you want for other drives
(for eg. y:) just include y:\ like  "dir d:\ y:\" in above command.
4. The del takes care if you run it for second time.
5. Enjoy find and copy!!

Good Day!!

Sriram.
Subject: Re: How do I extract a list of images from a folder with 1000s of images?
From: sriramchandrk-ga on 28 Sep 2006 06:03 PDT
 
Hi,

This is answer but the answer link doesnt work from my account :(

copy and paste the command in cmd prompt (Start -> Run -> cmd <enter>)

del d:\test & ((for /F %f in ('type r.txt') do dir d:\ /b /s | find
"%f") |find /v "find") > f.txt & for /F %d in ('type f.txt') do copy
/Y %d d:\test

1. Before running the above line create a directory named test in d:
2. save the filenames in d:\r.txt
3. The above command searches only d:\; if you want for other drives
(for eg. y:) just include y:\ like  "dir d:\ y:\" in above command.
4. The del takes care if you run it for second time.
5. Enjoy find and copy!!

Sample r.txt
D:\>type r.txt
icon2.jpg
logo.jpg

Sample Run:


D:\>del d:\test & ((for /F %f in ('type r.txt') do dir d:\ /b /s | find "%f") |f
ind /v "find") > f.txt & for /F %d in ('type f.txt') do copy /Y %d d:\test
d:\test\*, Are you sure (Y/N)? y

D:\>copy /Y d:\sundumper\Tran_Dumpers\images\icon2.jpg d:\test
        1 file(s) copied.

D:\>copy /Y d:\sundumper\Tran_Dumpers\images\logo.jpg d:\test
        1 file(s) copied.


Good Day!!

Sriram.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy