home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Perform a directory search
- ;
- MESSAGE "^MEnter the wildcard template: "
- GET S0 ; Read keyboard
- ;
- ; Initialize the lookup
- ;
- FFIRST S0 ; Initialize
- IF Failure ; If not found
- MESS "No files match!"
- EXIT ; Quit here
- ENDIF
- LEGEND "Scripted wildcard file search"
- ;
- ; Display the file names
- ;
- Loop_0:
- N0 = 0 ; Set loop counter
- Loop_1:
- FNEXT S0 ; Get next file name
- IF Failure ; If end of list
- EXIT ; Quit
- ENDIF
- ;
- ; Handle subdirectories
- ;
- FATTR S1 S0 ; Get attribute
- IF STRCMP S1(3:3) "1" ; If a subdirectory
- S0(13:79) = "<subdir>"
- MESS S0 ; Display
- GOTO End_Loop ; Goto endloop
- ENDIF
- ;
- ; Get remaining information, format and print
- ;
- FSIZE S1 S0 ; Get file size
- FDATE S2 S0 ; Get file date
- FTIME S3 S0 ; Get file time
- S0(13:79) = S1 ; Set size
- S0(21:79) = S2 ; Set date
- S0(31:79) = S3 ; Set time
- MESS S0 ; And display
- ;
- ; After 23 lines, wait for a keypress
- ;
- End_Loop:
- INC N0 ; Count the line
- IF LT N0 23 ; If less than 23 lines printed
- GOTO Loop_1 ; .. continue
- ENDIF
- MESS "Press any key to continue"
- KEYGET S0 ; Wait for any key
- GOTO Loop_0 ; And start a new screen