Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Indicates if the item is part of the file system.
This property is read-only.
Syntax
bIsFileSystem = FolderItem.IsFileSystem
Property value
A Boolean that receives true if the item is part of the file system or false if not.
Examples
The following example uses IsFileSystem to determine whether the Windows folder is a part of the file system. Proper usage is shown for JScript, VBScript, and Visual Basic.
JScript:
<script language="JScript">
function fnIsFileSystemJ()
{
var objShell = new ActiveXObject("shell.application");
var objFolder2;
var ssfWINDOWS = 36;
objFolder2 = objShell.NameSpace(ssfWINDOWS);
if (objFolder2 != null)
{
var objFolderItem;
objFolderItem = objFolder2.Self;
if (objFolderItem != null)
{
var bReturn;
bReturn = objFolderItem.IsFileSystem;
}
}
}
</script>
VBScript:
<script language="VBScript">
function fnIsFileSystemVB()
dim objShell
set objShell = CreateObject("shell.application")
if (not objShell is nothing) then
dim objFolder2
dim ssfWINDOWS
ssfWINDOWS = 36
set objFolder2 = objShell.NameSpace(ssfWINDOWS)
if (not objFolder2 is nothing) then
dim objFolderItem
set objFolderItem = objFolder2.Self
if (not objFolderItem is nothing) then
dim bReturn
bReturn = objFolderItem.IsFileSystem
end if
set objFolderItem = nothing
end if
set objFolder2 = nothing
end if
set objShell = nothing
end function
</script>
Visual Basic:
Private Sub fnIsFileSystemVB()
Dim objShell As Shell
Dim objFolder2 As Folder2
Dim ssfWINDOWS As Long
ssfWINDOWS = 36
Set objShell = New Shell
Set objFolder2 = objShell.NameSpace(ssfWINDOWS)
If (Not objFolder2 Is Nothing) Then
Dim objFolderItem As FolderItem
Set objFolderItem = objFolder2.Self
If (Not objFolderItem Is Nothing) Then
Dim bReturn As Boolean
bReturn = objFolderItem.IsFileSystem
Else
'FolderItem object returned nothing.
End If
Set objFolderItem = Nothing
Else
'Folder object returned nothing.
End If
Set objFolder2 = Nothing
Set objShell = Nothing
End Sub
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
IDL |
|
DLL |
|