(view source code of filesys.rex as plain text)
/* FileSys, Version 2.00 for OS/2 and Windows *//* Written by Rob van der Woude *//* http://www.robvanderwoude.com *//* Parameter check */Parse Upper Arg drive dummy
If dummy <> "" Then Call Syntax
If drive = "" Then Do
drive = FileSpec( "D", Directory( ) )
EndElse Do
If Pos( "?", drive ) > 0 Then Call Syntax
If Length( drive ) = 1 Then drive = drive||":"
If Length( drive ) > 2 Then Call Syntax
If right( drive, 1 ) <> ":" Then Call Syntax
If left( drive, 1 ) < "A" Then Call Syntax
If left( drive, 1 ) > "Z" Then Call Syntax
End/* What OS? */Parse Source os .
/* OS specific code */If os = "OS/2" Then Do
/* Initialize RexxLib */Call RxFuncAdd "RexxLibRegister", "RexxLib", "RexxLibRegister"
Call RexxLibRegister /* Check if specified drive is ready, and get FS type if ready */If DOSDISK( "T", drive ) = -1 Then filesys = "notready"; Else filesys = DOSFILESYS( drive )
EndElse Do
/* Initialize RexxUtil */Call RxFuncAdd "sysloadfuncs", "RexxUtil", "sysloadfuncs"
Call sysloadfuncs /* Get file system type */filesys = SysFileSystemType( drive )
If filesys = "" Then filesys = "notready"
If filesys = "UFS" Then filesys = "unknown"
End/* Display the result */SayIf filesys = "notready" Then Do
Say "Drive "||drive||" is not ready"
EndElse Do
Say "File system of drive "||drive||" is "||filesys
End/* End main program */Exit 0
Syntax: Procedure
SaySay "FileSys, Version 2.00 for OS/2 and Windows"
Say "Show the file system type for the specified drive"
SaySay "Usage: FILESYS.REX [ drive ]"
SaySay "If no drive is specified, the current drive is assumed."
Say 'Empty CDROM drives will return "not ready".'
If os = "OS/2" Then Say "OS/2 version needs Quercus Systems' REXXLIB"
SaySay "Written by Rob van der Woude"
Say "http://www.robvanderwoude.com"
Exit 1
Returnpage last modified: 2025-10-11; loaded in 0.0063 seconds