September 08 2010 08:09:17
Navigation
· Home
· Online Store
· Course Outlines (PDF Files)
· Sample Videos
· Contact Info
· Web Links
· Articles (Sample Code)

Other Videos
· WordPress (CMS)
· Joomla (CMS)
· Sharepoint

Other
· FAQ
· Search
Contribute to This Site
· Submit Link
· Get Benefitted Sites
No Competition
One of our so-called competitors offers under 6 hours of video training for a whopping $219 (choke, gasp, spew - you could hire a private tutor for that price). Did I mention that they ship their training on VHS tapes (remember those?). Check out our 'Course Outlines' link above. We offer a 2-days of training (15 hours) for $54 (2 CDs at $29 each). You watch our videos from a CD/ROM on your computer. We also include real-world lab/assignments in each course.
Articles: FSO/Drives
FSO/Drives
'==========================================================================
' NAME: FSO_Drives_List.vbs 
' AUTHOR: Neal Walters 
' DATE  : 3/26/2005
' http://VBScript-Training.com
'==========================================================================



WScript.Echo ShowDriveList


Function ShowDriveList
   Dim fso, d, dc, s, n
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set d = fso.Drives.Item("D:") 
      n = ""
      s = s & d.DriveLetter & " - " 
      If d.DriveType = Remote Then
         n = d.ShareName
      ElseIf d.IsReady Then
         n = d.VolumeName
      End If
      s = s & n & VbCrLf 
   ShowDriveList = s
End Function


'==========================================================================
' NAME: FSO_Drives_List.vbs 
' AUTHOR: Neal Walters 
' DATE  : 3/26/2005
' http://VBScript-Training.com
'==========================================================================



WScript.Echo ShowDriveList 


Function ShowDriveList
   Dim fso, d, dc, s, n
   Set fso = CreateObject("Scripting.FileSystemObject")
   
   
   Set dc = fso.Drives
   
   numDrives = dc.Count 
   WScript.Echo "There are " & numDrives & " on this computer." 

   For Each d In dc
      n = ""
      s = s & d.DriveLetter & " - " 
      If d.DriveType = Remote Then
         n = d.ShareName
      Elseif d.IsReady Then
         n = d.VolumeName & " space available = " & FormatNumber(d.FreeSpace / 1024 / 1024,0) & "MB"
      End If
      s = s & n & VbCrLf 
   Next
   ShowDriveList = s
End Function


'==========================================================================
' NAME: FSO_Drives_Types.vbs 
' AUTHOR: Neal Walters 
' DATE  : 3/26/2005
' http://VBScript-Training.com
'==========================================================================
Option Explicit 

Dim driveTypeCDROM, driveTypeFixed, driveTypeRemovable 

driveTypeCDROM = 4
driveTypeFixed = 2
driveTypeRemovable = 1 

WScript.Echo ShowDriveList 

Function ShowDriveList
   Dim fso, d, dc, s, n, drvType, numDrives, remote 
   Set fso = CreateObject("Scripting.FileSystemObject")
   
   
   Set dc = fso.Drives
   
   numDrives = dc.Count 
   WScript.Echo "There are " & numDrives & " on this computer." 

   For Each d In dc
      n = ""
      s = s & d.DriveLetter & " - " 
      If d.DriveType = Remote Then
         n = d.ShareName
      Elseif d.IsReady Then
         n = d.VolumeName & " space available = " & FormatNumber(d.FreeSpace / 1024 / 1024,0) & "MB"  
      End If
      Select Case d.DriveType 
         Case driveTypeCDROM 
             drvType = driveTypeCDROM 
         Case driveTypeFixed 
             drvType = "Fixed" 
         Case driveTypeRemovable 
             drvType = "Removeable" 
         Case Else 
             drvType = d.DriveType 
      End Select 
      s = s & " type=" & drvType & " " 
      s = s & n & VbCrLf 
   Next
   ShowDriveList = s
End Function

Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Order Now - View Products


Default Shipping:
Phone: 214-403-6006
Our Sites
Software Training
XML-Online-Training.com
Biztalk-Training.com
SharePoint-Training.com
DotNet-AddOns-Training.com
CMSTrainingVideos.com

Language
LanguageLovers.com
Render time: 0.01 seconds 432,186 unique visits