Asp Codes
ActiveX
ADO
Array
Code Snippets
Components
Data Access
Date Time
Files
Graphics
HTML Formatting
Mathematics
Miscellaneous
Sessions
SQL
Strings
Techniques
XML
Asp > Code Snippets sample source codes
Display all available drives on your system and displays
Display all available drives on your system and displays various other information about free space , the total size and the file system <% 'declare our variables Dim objFSO , objDrive , drive 'create an instance of FileSystemObject Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objDrive = objFSO.Drives 'loop through every drive that is present For Each drive in objDrive 'if the drive is ready then execute the following If drive.IsReady Then Response.Write drive.DriveLetter & "
" Response.Write drive.Path & "
" Response.Write drive.FileSystem & "
" Response.Write drive.TotalSize & "
" Response.Write drive.FreeSpace & "
" 'if the drive is not ready execute the following Else Response.Write drive.DriveLetter & "
" Response.Write "is unavailable" End If Next destroy objects Set objDrive = Nothing Set objFSO = Nothing %>
Privacy Policy
|
Link to Us
|
Links