List All Files in a Folder...

G

Guest

If I have a Folder "C:\Bobs"

I'd like to Loop thru all Files in that Folder,
check the Filename, and add it to a Table
if the FileName isn't already in the Table.

Coding adding the Filename is NOT a problem.

But...can I Loop thru all the Files to examine each Filename?

TIA - Bob
 
G

Guest

Pieter - THANK you.

Bob

Pieter Wijnen said:
sure
vba snippet

fname = dir("c:\bob\*.*")
while len(fname)
' do your stuff
fname=dir()
wend

tip
make a unique index on the filename to avoid dups.

hth
--
Pieter Wijnen

My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/




--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4592 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top