• Welcome to Jose's Read Only Forum 2023.
 

IDrive.FileSystem Property

Started by José Roca, July 14, 2008, 05:21:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca



The following code illustrates the use of the FileSystem property:

JScript


function ShowFileSystemType(drvPath)
{
   var fso,d, s;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   d = fso.GetDrive(drvPath);
   s = d.FileSystem;
   return(s);
}


VBScript


Function ShowFileSystemType(drvspec)
   Dim fso,d
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set d = fso.GetDrive(drvspec)
   ShowFileSystemType = d.FileSystem
End Function


PowerBASIC


FUNCTION ShowFileSystemType (BYVAL drvspec AS STRING) AS STRING

   LOCAL fso AS IFileSystem
   LOCAL d AS IDrive
   
   fso = NEWCOM "Scripting.FileSystemObject"
   d = fso.GetDrive(UCODE$(drvspec))
   FUNCTION = ACODE$(d.FileSystem)

END FUNCTION