Sys(2000)
This is a nice little function that's been mostly superseded by later additions to the language. It returns the name of a file matching a skeleton. You can use it in a loop to find all files that match a given skeleton.
Usage |
cFileName = SYS( 2000, cSkeleton [ ,1 ] ) |
Parameter |
Value |
Meaning |
cSkeleton |
Character |
A file specification. It can contain the DOS wildcards "?" and "*". |
1 |
Included |
Find the next matching file. |
Omitted |
Find the first matching file. |
Example |
* Our own version of ADIR() - no reason to use it * Assume cSkel is the file skeleton LOCAL nFileCount, cFileName, aFiles[1] cFileName=SYS(2000,cSkel) nFileCount=0 DO WHILE NOT EMPTY(cFileName) nFileCount = nFileCount + 1 DIMENSION aFiles[nFileCount] aFiles[nFileCount] = cFileName cFileName = SYS(2000,cSkel,1) ENDDO |
See Also |