Get a list of files in a directory?

175 views
Skip to first unread message

wsw

unread,
Aug 18, 2021, 10:48:22 AM8/18/21
to jBASE
Does anyone have an example of how I can loop through a directory and get all the file names? Thanks in advance.

Dick Thiot

unread,
Aug 18, 2021, 10:53:38 AM8/18/21
to jb...@googlegroups.com
If this directory exists within your PATH environment then you can just select it and process like any other select list.  The other option is to provide the full path to the directory.  Are you are Linux, AIX or Windows?

On Wed, Aug 18, 2021 at 9:48 AM wsw <jbas...@gmail.com> wrote:
Does anyone have an example of how I can loop through a directory and get all the file names? Thanks in advance.

--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
 
To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

---
You received this message because you are subscribed to the Google Groups "jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbase+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbase/84f34e49-f9d7-400b-a895-99de735156afn%40googlegroups.com.

Mvreply

unread,
Aug 18, 2021, 11:05:23 AM8/18/21
to jb...@googlegroups.com

Hello,

You can do something like this:

 

OPEN '.' TO CurDir ELSE STOP 201,'.'

   

SELECT CurDir

 

and then inspect the results in a LOOP WHILE READNEXT.

 

Mike

--

wsw

unread,
Aug 18, 2021, 11:17:33 AM8/18/21
to jBASE
Thanks gentlemen. I used Mike's example.

Deogratius Musisi

unread,
Sep 25, 2023, 3:04:52 PM9/25/23
to jBASE
@W2W Kindly Share
Reply all
Reply to author
Forward
0 new messages