Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop around files in a folder

Status
Not open for further replies.

PizMac

Programmer
Nov 28, 2001
90
GB
I would like to code a procedure that (given a known folder name):-

loops around a routine which
imports file beginning with "xyz" (of indeterminate types)
appends file to a combined table
moves said file to sub-folder (named archive)

the import (once I know the file name) and append I don't have a problem with, and I think I can work out the move - any help appreciated on a loop around the file directory listing and getting the file names that exist

Thanks
Judith Pizer
 
Hi

See Dir() in help

something like:

Filename = Dir("xyz*")
Do Until Filename = ""
' do whatevwer with file name
filename = dir()
Loop

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top