strMinimum=1048576000 'size in bytes (1GB) strDrive="C:" If HasFree(strDrive,strMinimum) Then WScript.Echo "Drive " & strDrive &_ " has enough free avaialable space to continue." Else WScript.Echo "Oops! Drive " & strDrive &_ " does NOT have enough free avaialable space to continue." WScript.quit End If 'run additional code here now that you know the drive has enough 'free available Space Wscript.quit Function HasFree(strDrive,strMinimum) 'StrDrive is a drive letter like C: 'strMinimum is the minimum number of bytes to have 'available Set objFSO=CreateObject("Scripting.FileSystemObject") Set objdrive=objFSO.GetDrive(strDrive) If objdrive.AvailableSpace >=strMinimum Then HasFree=True Else HasFree=False End If End Function