GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
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 : C:/nginx/html/JimMartinson/_Archive/CST1861/Lab04/ |
Upload File : |
@echo off :: backupext.cmd :: Written by: :: Written on: :: Test if command line extensions are enabled. if "%~1"=="~1" goto:ExtensionsAreNotEnabled :: Display help when the /? parameter is passed. if NOT "%~1"=="/?" goto SkipHelp :Help echo Searches all local drives for files of a type specified by the user (ie: .doc, .dwg, .drw) echo and backs them up to a directory specified by the user. echo. echo Usage: %~n0 .ext dir_path echo. echo .ext = file type echo dir_path = backup directory. If dir_path does not exist it will be created. 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 ::NOTES: :: If directory specified by the user does not exist, create it. :: If no files exist with the extension the user specified, display an error. :: Add a /r switch to include the Recycle Bin in the backup. setlocal set _error= set _ext= set _dir= :checkArgument shift if "%~0"=="" goto:continue :: Check for extention or /m. set _temp=%~0 if "%_temp:~0,1%" EQU "." goto:getExtension if defined _dir call:error "Duplicate directories (%~0)" set _dir=%~0 goto:checkArgument :continue if "%_ext%"=="" ( echo The extension is not defined. set _error=yes ) if "%_dir%"=="" ( echo The backup directory is not defined. set _error=yes ) if NOT exist "%_dir%\" md "%_dir%" if NOT exist "%_dir%\" ( echo Unable to make backup directory ^(%_dir%^). set _error=yes ) if defined _error goto:EOF for %%d in (A B 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:backupDrive %%d set _ goto:EOF :backupFile set _filePath= set _fileName= :backupFileNext for /f "tokens=1,* delims=\" %%p in ("%~1") do call:backupFileSet "%%p" "%%q" set _filePath=%_filePath:~1% if NOT "%_filePath%"=="%_dir%" if NOT "%_filePath:~3,12%"=="$RECYCLE.BIN" ( rem You may want to ensure that only the NEWEST file with the same name is copied. See duplicatefiles.cmd. echo %_filePath% %_fileName% copy "%_filePath%\%_fileName%" "%_dir%\%_fileName%">nul ) goto:EOF :backupFileSet if defined _fileName ( set _filePath=%_filePath%\%_fileName% ) set _fileName=%~1 if NOT "%~2"=="" for /f "tokens=1,* delims=\" %%p in ("%~2") do call:backupFileSet "%%p" "%%q" goto:EOF :backupDrive if NOT exist %1:\ goto:EOF ::echo 62 %1 set _drive=%1: call:getDirectory "%_dir%" for /f "tokens=* delims=;" %%f in ('dir /b /s %_drive%\*%_ext% 2^>nul') do call:backupFile %%f goto:EOF :error echo %~1 not allowed. set _error=yes goto:EOF :getDirectory set _dir=%~f1 goto:EOF :getExtension if defined _ext ( call:error "Multiple extensions (%~0)" ) set _ext=%~0 goto:checkArgument