I've got 1,000s of images that I need to import the file names into excel so I can map them to the relevant products. Is there a way to import all the image names froma specific folder on my computer into excel?
I've got 1,000s of images that I need to import the file names into excel so I can map them to the relevant products. Is there a way to import all the image names froma specific folder on my computer into excel?
I started collating several routines that I found for browsing for a folder and then listing the files in the folder.
It doesn't actually matter that they're images or whatever.
The collection is in the attached workbook. Enjoy.
Note that some of the options will not work in Excel 2007 and above.
Regards
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
nice collection TMShucks, very useful.
Great, thanks for that - Ill give it a go
I'm trying to find someone with a copy of excel 2003 or below to give this a try, does anyone else have anything that will work on 2007 or 2010?
Try this, you can adapt it for what you need.
List Files
Last edited by royUK; 03-20-2011 at 06:48 AM.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
you could just run a simple batch file then import result into excel
in notepad put
where first bit is where images are and second bit is where you want the text file "list.text" to go ,note the quotes you'll need them if your subdirectory names have spaces like mine doPlease Login or Register to view this content.
save the notepad save as file type all files and name it something like getlist.bat
double click it to run. The above creates a text file called list.txt of all "my documents" folder on my desktop,
import the result into excel
Last edited by martindwilson; 03-21-2011 at 01:55 PM.
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
The code works for me.
nope just click the batch file ,oh i see you mean direct in run without a batch file
no
open run
type cmd and enter
in the cmd.exe window paste in
enter and it will do the samedir "C:\Documents and Settings\Martin Wilson\My Documents" > "C:\Documents and Settings\Martin Wilson\Desktop\list.txt"
HI TMS,
I used your code and thanks it works! You're great!
I also want to get the dimension of the photos, could you help me? thanks!
Last edited by mark_anthony; 05-06-2014 at 02:37 AM.
Hi mark_anthony, and welcome to the forum.
Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.
If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.
Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
I use this
Please make the Post as solved, when you get your answer & Click * if you like my suggestion
Hi TMS, sorry for this.
Thanks for your reminder.
akhileshgs
Your post does not comply with Rule 7 of our Forum RULES. Please do not ignore requests by Administrators, Moderators and senior forum members regarding forum rules.
If you are unclear about the request or instruction then send a private message to them asking for clarification. Do not post a reply in a thread where a moderator has requested an action that has not yet been complied with e.g Title change or Code tags...etc
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks