Processing more than one file

PISCES

Registered User.
Local time
Today, 13:22
Joined
Mar 11, 2004
Messages
12
Hi Group,
Is it possible to process more than one file from within Access.
I've seen the Open <FileName> for input as #1 but no examples on how to use this for multiple files.

Regards
 
Don't recall how many files you can use, but ....

Open <file> for INPUT as #1, ....
Open <file> for INPUT as #2, ....



Read #1, s, v, u
Read #2, x, y, z,



etc.

JUST REMEMBER: Close what you open.

Supposedly, with REGEDIT (or is it REGEDIT32?) there is a way to see how many files you can have open at the same time system-wide. It is the "handles" limit.

You can also look at "Limits" in Ac97 Help or "Specifications" in Acxx (xx after Ac97) Help to see the open file limits.

It isn't infinite but you can surely have more than one open at a time.
 
Off the back of that..

How can I read the names of files in a given directory with a given extension?
 
PISCES said:
How can I read the names of files in a given directory with a given extension?

Look up FindFile (or is it FileFind... never remember that when I need it) in the Help Files. They have VBA code examples last time I looked at it.

It is basically a mini-application object where you give it the path and the file-search template, then activate it with a method that actually runs the search.

It returns a collection called .FoundFiles or something like that, for which you can read .FoundFiles.Count as the number and .FoundFiles(n) as the nth file you found matching the template. The "found files" are reported by fully qualified file specification - Dev:\pathroot\pathstep\...\pathstep\file.typ
 

Users who are viewing this thread

Back
Top Bottom