Date: Thu, 13 Sep 2001 07:12:32 -0400
Reply-To: Richard DeVenezia <radevenz@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Richard DeVenezia <radevenz@IX.NETCOM.COM>
Organization: MindSpring Enterprises
Subject: Re: AF Directory Viewer
"Graeme Kirton" <gkirton@FILCS.COM> wrote in message
news:80256AC6.0033DBFB.00@fil-notes01.filcs.com...
> I was wanting some tips on how to view the contents of a directory using
for
> e.g. a list box?? I want to the be able to select one or more of the
files.
>
snip
For selecting operating system files, I recommend using a dialog.
There is the:
FileDialog() function for selecting one operating system file
FileList() function for selecting one existing fileref
For multiple selections, in ms-windows, there is Windows
API:GetOpenFileNameA()
If you don't want to use a dialog, you can get a list of files (in
ms-windows) by using Windows API FindFileFirst() and FindFileNext().
You can find examples of all these on my website in the SAS/AF, Windows API
and Macros [ListFile] sections.
If you don't use any above the above there is also these techniques
- code a dopen() [or mopen()] loop with dread() inside to get the info to
place in the listbox.
- use a filename pipe to run a system file listing command and read the
output using a fopen() loop with fread()/fget() inside
- ...
--
Richard DeVenezia - SAS Macros and AF Tools
http://www.devenezia.com