Tech Support Forum banner
Status
Not open for further replies.
1 - 6 of 6 Posts

·
Registered
Joined
·
5 Posts
Discussion Starter · #1 ·
ok, I have a a file, with 20,000 images.. and a list with around 10,000 image names... the list in is excel, and I am on windows xp...how do i sort out the images that are specified in the list? Is there some software, or some type of batch file? any help would be greatly appreciated.
Thanks,
 

·
TSF-Emeritus
Joined
·
2,057 Posts
Hello Gavintfn.

I'm a bit confused as to what your asking. Are you wanting to pair up the images with the corresponding image names? Perhaps just sorting them in a certain order, like:

Image_Name

*********
*********
********* <--- Image
*********
*********

Also, do you want to have all this to stay in Excel? Or are you planning on putting it into another program for the format you desire?
 

·
Registered
Joined
·
5 Posts
Discussion Starter · #3 · (Edited)
thanks for your help by the way,..
i guess the easy way to explain what I need is a Batch sort, I only need to keep the images that are in the list. The others can be trashed... The problems really is cause by the images all having numeric names, and there is no way to sort them accordingly. Example

(images in file)
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg
etc.

( excel list of images i need to keep)
1.jpg
3.jpg
5.jpg
6.jpg
8.jpg
etc...

so i want to either delete the images if they are not on the list, or move the ones that are into a new folder.
The problem exists because there are 20,000 images in the folder, and I only need 10,000 of them. oh, and they are all 4 digit or more names... so 201689.jpg
Thanks...
 

·
Registered Member
Joined
·
236 Posts
So, you're saying that you need to trash 10,000 .jpg files, and keep the other 10,000, right?

The problem is that if there is no order to the madness of what jpg's you want, then there is no way to program something to pick out only those (unless of course you (somehow) programmed in some sort of artificial intelligence). It'd be as efficient as just taking the ones you need manually.
 

·
Registered
Joined
·
5 Posts
Discussion Starter · #5 ·
actually, figured it out... its running now, it requires a "for loop" in command prompt. heres the command i used...

for /f %a in ('type MOVE.TXT') do copy %a C:\moved

from command prompt, i ran it within the folder that contained the images
what it does, is looks at move.txt (the list of images) checks each line in the text doc against the files names, and if the file name exists, it moves the file to folder C:\Moved

so in all heres what it looks like in command prompt:

C:\Documents And Settings\My Documents\Product Images> for /f %a in ('type MOVE.TXT') do copy %a C:\moved

for it to work, i had to create the folder "Moved" first, and put my list "Move.txt" in the same folder as the images.... and then...like magic...lol
But thanks for your help....
 

·
Registered Member
Joined
·
236 Posts
Sorry, I didn't realize you had a text file that told you which ones you needed to move, that would've been much easier.

Also, you may want to mark this thread as solved then. (click on where it says "Thread Tools" at the top)
 
1 - 6 of 6 Posts
Status
Not open for further replies.
Top