List All Files in a Folder...

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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!
 
Back
Top