Google Answers Logo
View Question
 
Q: Excel Question ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Excel Question
Category: Computers > Software
Asked by: sgwilton-ga
List Price: $10.00
Posted: 13 Jan 2004 00:57 PST
Expires: 12 Feb 2004 00:57 PST
Question ID: 295848
I have a problem that I hope someone has a simple solution to.  I have
an excel csv that has a listing of 5000+ jpeg images, these images are
for our product listing on our website.  On my computer I have a
directory that contains the entire collection of our product images,
this folder contains over 15000 jpeg images.  What I require is a
solution to be able to select the 5000 images that are in our excel
csv file from our directory of 15000 images & place these 5000 image
files into a seperate directory.

We are using excel 2002 on win xp pro.

I am hoping there is someone to automate this rather than have a
person go through & copy each image file from the master directory of
15000+ images.

Request for Question Clarification by blazius-ga on 13 Jan 2004 01:07 PST
Some more detail would be useful for giving you an answer:

- How is the image listing organized?  Can it be regarded as a
spreadsheet with 1 colcoumn and 5000+ rows?

- What does the filenames look like?  Like "file_0001.jpeg" or like
"c:\data\catalog\pictures"?

Request for Question Clarification by blazius-ga on 13 Jan 2004 01:09 PST
Sorry for the typos in my clarification request.  The last question
should have been:

- What does the filenames look like?  Like "file_0001.jpeg" or like
"c:\data\catalog\pictures\file_0001.jpeg"?

Clarification of Question by sgwilton-ga on 13 Jan 2004 01:13 PST
Yes, that is correct.  One column with 5000+ rows.

currently the listings in the excel document are for example

fullsize/image1.jpg
fullsize/image2.jpg

It is possible for me to remove the path & just have the image1.jpg
listed in the excel doc.

Request for Question Clarification by blazius-ga on 13 Jan 2004 01:47 PST
I have found a solution for this problem, but it needs the WinZip
program file compression utility to work.  Do you have this program
installed on the system?

Clarification of Question by sgwilton-ga on 13 Jan 2004 01:48 PST
Yes, I have winzip.
Answer  
Subject: Re: Excel Question
Answered By: blazius-ga on 13 Jan 2004 02:38 PST
Rated:5 out of 5 stars
 
You can use the WinZip utility to create a zip file that will contain
the files that are listed in a text file.  The text file must contain
the list of file names, one on each line, like this:

  c:\some_directory\pictures\image_00023.jpeg
  c:\some_directory\pictures\image_73821.jpeg
  
and so on.  The filenames must be complete - they must include the
drive letter and full folder name.

A CSV file will contain the information in an Excel spreadsheet with
each line in the CSV representing one row in the sheet.  Coloumns are
separated with commas.  If your CSV contains only one coloumn, it
should not contain any commas at all, and be ready for use as a file
list fow WinZip.  You can check this by viewing the CSV file in a text
editor such as Notepad.  Make sure that the file names are complete
(if not, I could assist you with completing them).  Close the file.

Then we are ready for creating the ZIP file.  Close WinZip if it is
already open.  Then select the "Run" option in Windows' "Start" menu. 
Enter a command similar to this:

  winzip -a -e0 c:\zipfilepath\selected.zip @c:\filelistpath\file_list.csv

Replace c:\zipfilepath\selected.zip with the desired name and path for
the new zip file, and replace c:\filelistpath\file_list.csv with the
complete file name of the CSV file.  Do not omit the @ before the CSV
file name - this tells WinZip that the CSV file is a list of files
(and not a file that you want to compress).

This command will start WinZip, create a file called
c:\zipfilepath\selected.zip and add the files listed in
c:\filelistpath\file_list.csv to this file.  The -e0 parameter tells
WinZip that it should not try to compress the files - jpeg images are
already compressed, and WinZip will just waste time if it tries to
squeeze these any further.

You should then have a zip file containing the files listed in the CSV
file.  You can unzip this file to the directory where you wish to keep
the selected files.

I think this should solve your problem.  If anything does not work as
expected, please request an answer clarification.

Search strategy:
I knew of this WinZip fucntion already, and looked it up on the WinZip
website at http://www.winzip.com/xcmdline.htm .

Clarification of Answer by blazius-ga on 13 Jan 2004 02:59 PST
Hello again, sgwilton,

I see that you already got some assistance from another researcher in
editing the list of file names
(http://answers.google.com/answers/threadview?id=292475).  You could
use the same method for adding the drive/path information to the list
of file names.
sgwilton-ga rated this answer:5 out of 5 stars
Excellent Answer!  This saved me many hours of manual labor, I appreciate your help!

Comments  
There are no comments at this time.

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