Go Back   PCMech Forums > Help & Discussion > Software Discussion & Support

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 01-12-2007, 03:29 PM   #1
The Gavel
 
LawyerRon's Avatar
 
Join Date: Dec 1999
Location: Upland, CA
Posts: 6,311
Can this be done in Excel?

I have a cd with about 2,000 jpg photos on it. I need to get the file names only of all 2,000 jpg photos into an Excel spread sheet. In other words, I need a “list” of all the filenames in Excel. Is there some way to bring them (the filenames) into Excel without having to “copy and paste” each filename into a cell in Excel?
__________________
"To speak ill of others is a dishonest way of praising ourselves"
LawyerRon is offline   Reply With Quote
Old 01-12-2007, 03:35 PM   #2
glc
Forum Administrator
Staff
Premium Member
 
glc's Avatar
 
Join Date: May 2000
Location: Joplin MO
Posts: 37,777
http://j-walk.com/ss/excel/usertips/tip077.htm

You can modify the directory listing accordingly - example -

dir d:\*.jpg /s /b >c:\filename.txt

Last edited by glc; 01-12-2007 at 03:39 PM.
glc is offline   Reply With Quote
Old 01-12-2007, 03:42 PM   #3
The Gavel
 
LawyerRon's Avatar
 
Join Date: Dec 1999
Location: Upland, CA
Posts: 6,311
Cool. Thanks g!
LawyerRon is offline   Reply With Quote
Old 01-12-2007, 04:10 PM   #4
The Gavel
 
LawyerRon's Avatar
 
Join Date: Dec 1999
Location: Upland, CA
Posts: 6,311
OK, I got that to work, but I have another question. I was able to create the txt file and open it in Exel. However, the photo filenames have the path in front of them, eg: c:\photo.jpg. How do I quickly remove the path name in front of the photo's filename in Excel? The path name is the same in front of every photo's filename.
LawyerRon is offline   Reply With Quote
Old 01-12-2007, 04:19 PM   #5
Come in Ray...
 
faulkner132's Avatar
 
Join Date: Sep 2004
Posts: 1,668
Assuming your path is always c:\ and the filename is in column A, this formula would work:
Code:
=MID(A1,4,100000)
The middle number (4) controls where you start the resulting string from, the 100000 is the length, so this assume you have no file names over 100000 characters.

If your files were in c:\photos\picture.jpg, this would work:
Code:
=MID(A1,11,100000)
faulkner132 is offline   Reply With Quote
Old 01-12-2007, 04:21 PM   #6
The Gavel
 
LawyerRon's Avatar
 
Join Date: Dec 1999
Location: Upland, CA
Posts: 6,311
Thanks. I'll give it a try.
LawyerRon is offline   Reply With Quote
Old 01-12-2007, 04:41 PM   #7
glc
Forum Administrator
Staff
Premium Member
 
glc's Avatar
 
Join Date: May 2000
Location: Joplin MO
Posts: 37,777
How about opening the text file in Word and using Edit - Replace and replacing c:\ with nothing? That should even work directly in Excel too.
glc is offline   Reply With Quote
Old 01-12-2007, 04:46 PM   #8
The Gavel
 
LawyerRon's Avatar
 
Join Date: Dec 1999
Location: Upland, CA
Posts: 6,311
Yeah, that sounds good too.
LawyerRon is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel ActiveX Warning Disable Stuey Software Discussion & Support 2 11-14-2005 04:49 PM
need to open excel spreadsheet carolinagurrl Software Discussion & Support 4 02-26-2005 06:41 PM
Excel prob: Compile error in hidden module calamospiza Software Discussion & Support 2 09-24-2002 04:12 AM
Excel data Formatting fifi Software Discussion & Support 1 06-07-2002 12:08 PM
How to convert Lotus 123 to Excel? robbsafc Software Discussion & Support 3 03-09-2002 04:31 PM


All times are GMT -5. The time now is 06:36 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2