Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Vista

Maintaining Your Windows Vista System : Checking Free Disk Space

- Windows 10 Product Activation Keys Free 2019
- How to active Windows 8 without product key
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/11/2011 9:24:10 AM
Hard disks with capacities measured in the tens of gigabytes are commonplace even in low-end systems nowadays, so disk space is much less of a problem than it used to be. Still, you need to keep track of how much free space you have on your disk drives, particularly the %SystemDrive%, which usually stores the virtual memory page file.

One way to check disk free space is to view the Computer folder using either the Tiles view—which includes the free space and total disk space with each drive icon—or the Details view—which includes columns for Total Size and Free Space, as shown in Figure 1. Alternatively, right-click the drive in Windows Explorer and then click Properties. The disk’s total capacity, as well as its current used and free space, appear in the General tab of the disk’s properties sheet.

Figure 1. Display the Computer folder in Details view to see the total size and free space on your system’s disks.

Listing 1 presents a VBScript procedure that displays the status and free space for each drive on your system.

Listing 1. A VBScript Example That Displays the Status and Free Space for Your System’s Drives
Option Explicit
Dim objFSO, colDiskDrives, objDiskDrive, strMessage

' Create the File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")

' Get the collection of disk drives
Set colDiskDrives = objFSO.Drives

' Run through the collection
strMessage = "Disk Drive Status Report" & vbCrLf & vbCrLf
For Each objDiskDrive in colDiskDrives

' Add the drive letter to the message
strMessage = strMessage & "Drive: " & objDiskDrive.DriveLetter & vbCrLf

' Check the drive status
If objDiskDrive.IsReady = True Then

' If it's ready, add the status and the free space to the message
strMessage = strMessage & "Status: Ready" & vbCrLf
strMessage = strMessage & "Free space: " & objDiskDrive.FreeSpace
strMessage = strMessage & vbCrLf & vbCrLf
Else

' Otherwise, just add the status to the message
strMessage = strMessage & "Status: Not Ready" & vbCrLf & vbCrLf
End If
Next

' Display the message
Wscript.Echo strMessage



This script creates a FileSystemObject and then uses its Drives property to return the system’s collection of disk drives. Then a For Each...Next loop runs through the collection, gathering the drive letter, the status, and, if the disk is ready, the free space. It then displays the drive data as shown in Figure 2.

Figure 2. The script displays the status and free space for each drive on your system.

Other -----------------
- Maintaining Your Windows Vista System : Checking Your Hard Disk for Errors
- Maintaining Your Windows Vista System : Vista’s Stability Improvements
- Working with Windows Communication Features (part 5) - Using Windows Meeting Space
- Working with Windows Communication Features (part 4) - Using Windows Calendar
- Working with Windows Communication Features (part 3) - Using Windows Mail to Access Newsgroups
- Working with Windows Communication Features (part 2) - Working with Windows Mail
- Working with Windows Communication Features (part 1) - Configuring Windows Mail for E-Mail
- Mobile Computing in Windows Vista : Getting the Most Out of Your Tablet PC
- Mobile Computing in Windows Vista : Configuring Presentation Settings & Understanding Windows SideShow
- Mobile Computing in Windows Vista : Managing Notebook Power
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
Celebrity Style, Fashion Trends, Beauty and Makeup Tips.
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server