Pulling filenames from a directory?

VegaLA

Registered User.
Local time
Today, 14:31
Joined
Jul 12, 2006
Messages
101
Good day all.

Been tasked with a rather urgent but time consuming project of catlogging the names of a whole bunch of Excel file names into a table. I'm expected to just copy and paste the names of the sheets to a table but i'm certain Access can automate this boring procedure with just a few lines of code, unfortunatly i'm not sure how to go about this.

There was a nice little app called Karen's Directory Printer, very helpfull but i'm not able to install any apps on my work PC so i'm going to have to re-invent the wheel!

Any help would be great as I can't imagine having to copy and paste the excel file names into a table!!

Thanks,
Mitch...
 
Brute force method...

1) Open a Command Prompt and change to the directory with the files
2) From that directory issue:
Code:
dir * /s/b > filelist.txt
3) Import the filelist.txt file into an Access table
 
Thanks for the reply Michael.

I eventually used the GetDirectory method as this system will be used by the staff here and I wanted to make the interface as fluid as possible.

Vega.
 
From the way your post read, I thought perhaps this was a one time task requirement. Yes, you found the VBA coded way to do the same. ;)
 

Users who are viewing this thread

Back
Top Bottom