Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


File system object examples

 

'File system object examples
'Add a list box to the form and then add a reference to the Microsoft Scripting Runtime

Private Sub Form_Load()
Dim fldr As Folder
Dim fso As New FileSystemObject
Dim drv As Drive
Set drv = fso.GetDrive(fso.GetDriveName("d:"))
With List1
.AddItem "Available space: " & FormatNumber(drv.AvailableSpace / 1024, 0) & " BK"
.AddItem "Drive letter: " & drv.DriveLetter
.AddItem "Drive type: " & drv.DriveType
.AddItem "Drive file system: " & drv.FileSystem
.AddItem "Drive free space: " & FormatNumber(drv.FreeSpace / 1024, 0) & " BK"
.AddItem "Drive is ready: " & drv.IsReady
.AddItem "Drive path: " & drv.Path
.AddItem "Root folder: " & drv.RootFolder
.AddItem "Serial number: " & drv.SerialNumber
.AddItem "Share name: " & drv.ShareName
.AddItem "Total size: " & FormatNumber(drv.TotalSize / 1024, 0) & " BK"
.AddItem "Volume name : " & drv.VolumeName
End With
End Sub

 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
create a word report on the services on your PC(VBScript)
Display all drives(VB.net)
Getting the length of a string(PHP)
active window title(VB)
unload all forms(VB)
Beep(VB)
scroll title bar caption(VB)
Does a file exist(Powershell)

    




Copyright © 2003 by programmershelp.co.uk