Jump to content

Import File Names In One Folder Into Xls Sheet Or Mdb Table


Recommended Posts

Posted

Hi,

I have a folder with many (>1,000) files (plant photos). How can I import the file name list into an Excel sheet or Access table which would then allow me to add remarks, descriptions etc. to each file?

If an import is possible is it also possible to import the file names as a click-able link to the original file?

opalhort

Posted
Hi,

I have a folder with many (>1,000) files (plant photos). How can I import the file name list into an Excel sheet or Access table which would then allow me to add remarks, descriptions etc. to each file?

opalhort

If your photos are in a folder called photos on your C drive then

go to Start -> Run and type:

cmd /c dir c:\photos /b > photolist.txt

A text file with the alphabetic file list will be created (it will not open automatically) just do a search for photolist.txt once you have run the command.

You can then import the text file into any application you choose.

Posted
Hi,

I have a folder with many (>1,000) files (plant photos). How can I import the file name list into an Excel sheet or Access table which would then allow me to add remarks, descriptions etc. to each file?

opalhort

If your photos are in a folder called photos on your C drive then

go to Start -> Run and type:

cmd /c dir c:\photos /b > photolist.txt

A text file with the alphabetic file list will be created (it will not open automatically) just do a search for photolist.txt once you have run the command.

You can then import the text file into any application you choose.

Thanks for the tip croftrobin :o .

Works very well with xls sheet but appears to need me to write some code in order to get it into a mdb table - no problem, can do.

Now if only I could figure out how to get the file name listed in the xls automatically linked to the original file (while in xls sheet click on file name and the photo opens).

I know how to get links into the lists but only one by one (too much work :D )

Any idea how this could be automated for the entire folder?

opalhort

Posted

Many ways you could do it, mostly involving Visual Basic.

You could import that txt directory listing into Access with the following.

In Access - File ->Get External Data.

Select your text file.

Run through the wizard steps.

  • 2 weeks later...
Posted
Now if only I could figure out how to get the file name listed in the xls automatically linked to the original file (while in xls sheet click on file name and the photo opens).

Use the Excel HYPERLINK function ...

=HYPERLINK("C:\photos\photo1.jpg", "Click to open")

If you have a file name in cell A1, then you could put this in B1 ...

=HYPERLINK(A1, "Click to open")

Excel is now overly security conscious, so you will probably get a message asking you to confirm that you REALLY want to open the JPG. There 'may' be a way of disabling this.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...