Hello Ben,

> I was wondering if it is at all possible to somehow query the windows
> environment about the files contained in a specific directory.  The idea I
> had was that I would query a directory where an open table resides for a
> file containing a certain string in its name.

Yes, it is possible, but yet again it involves venturing into the Windows
API. There are two functions which you need to use. The first allows you to
setup the file search filter and returns the first matching file. The second
allows you to fetch successive file names. The functions are both "legacy"
in nature and are therefore preceded by an underscore.

   long _findfirst(char* filespec, struct _finddata_t *fileinfo)
   long _findnext(long handle, struct _finddata_t *fileinfo)

I've never tried to access these before directly from MB and think there may
be a problem with reproducing the _filedata_t structure with correct byte
packing, etc. I've always wrapped the functions into my own DLL which is MB
accessible, and provides an easy way to return matching files using a simple
MB do loop.

Regards,
Warren Vick
Europa Technologies Ltd, U.K.
http://www.europa-tech.com

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to