home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ANews 1
/
AnewsCD01.iso
/
Internet
/
Newsgroup
/
THOR_2.6
/
THOR26_AREXX.LHA
/
Rexx
/
Examples
/
GetFileList_ex.thor
< prev
next >
Wrap
Text File
|
1999-01-17
|
801b
|
38 lines
/*
** $VER: GetFileList_Ex.thor 1.0 (6.5.95)
** - Example script for the GETFILELIST function in THOR 2.0
**
*/
options results
if(substr(address(),1,4) ~= "THOR") then do
parse arg thorport
if~(show(p, thorport)) then do
if ~(show(p, "THOR.01")) then do
say "No THOR port found!"
exit
end
else thorport = "THOR.01"
end
end
else thorport = address()
address(thorport)
GETFILELIST outstem LIST
if(rc ~= 0) then
do
if(rc = 5) then REQUESTNOTIFY TEXT '"Filedatabase window not open."' BT '"_Ok"'
if(rc = 6) then REQUESTNOTIFY TEXT '"No files selected."' BT '"_Ok"'
if(rc = 30) then REQUESTNOTIFY TEXT '"'THOR.LASTERROR'"' BT '"_Ok"'
exit
end
say 'You selected '||LIST.COUNT||' files'
do i=1 to LIST.COUNT
say 'Nr:' || LIST.FILENR.i || ' Filename: ' || LIST.FILENAME.i
end
exit