%DriveSpaceFree% Show Routine Code Author: Siegfried
Version: 1 - Date: 2007-02-15
Example calls:
%DriveSpaceFree% "%SystemDrive%"
%DriveSpaceFree% "%CD%"
%DriveSpaceFree% "%~dp0"
Remarks:
Checks for the free space and the total capacity of a drive.
Parameter 1 may be the drive like "C:" or "C:\" or any path to a directory on a drive.
A file path also works. The resulting "%Drive%" from an internal call on "%SplitPath%" will be used so any valid path on a drive works.
Returns:
%result% with the free space in Mb, e.g. "1405"
%result2% with the total capacity in Mb, e.g. "19120"
Returns "" if the drive does not exist.
Usage on the CD: - if xFUNCs.exe is in system32 -
Put the following code into your script. Returns the same as above. NOTE: A file path does not work for a direct call on xFUNCs.exe.
xFUNCs "DriveSpaceFree" "C:"
if exist "%temp%\TempLab.cmd" (
call "%temp%\TempLab.cmd"
del "%temp%\TempLab.cmd"
)