ROBOCOPY - Robust Copy, good for large copy jobs and can do multithreaded coping.
REM Examples:
Robocopy /E /MT:32 %SOURCE% %DEST%
Robocopy %SOURCE% %DEST% %FILES%
/E Copy all subdirectories including empty ones
/MT Multithreaded copy defaulted to 8 threads
%SOURCE% The source directory
%DEST% The destination
%FILES% The files to be copied, default is *.*
REM Examples:
RMDIR /S /Q
/S Remove all files and directories in the directory
/Q Supress prompting in /S
START - Starts a seprate DOS window
REM Examples:
/WAIT Wait for the window to terminate
%EXEC% Prorgam/Command to run in new window
NET START - Starts a win32 service
REM Examples:
NET START %SERVICE%
%SERVICE% The name of the service to start
NET STOP - Stops a win32 service
REM Examples:
NET STOP %SERVICE%
%SERVICE% The name of the service to stop
NET USE - Map a network drive
REM Examples:
NET USE %DRIVE% %PATH%
NET USE %DRIVE% %PATH% /USER:%USER% %PSWD%
%Drive% Drive letter "Z:"ECHO %PATH% UNC path to map
/USER User other than current logon
%USER% User name
%PSWD% Password
NET USER - Add and remove users from the local system
REM Examples:
NET USER %USER% %PSWD% /ADD
NET USER %USER% /DELETE
%USER% User name
%PSWD% User Password
/ADD Add user
/DELETE Delete user
NBTSTAT - NetBios information for a remote computer
REM Examples:
NBTSTAT -A %IP%
NBTSTAT -a %COMP%
-A Use the IP address
-a Use computer name
%IP% IP address
%COMP% Computer name
Date Stamp - Create a date stamp to be used as a folder name
for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j%%k
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set ttrn=%%i%%j%%k%%l
ECHO %tdtd%%ttrn%
SET - Get User input
SET /P URL=[Please Enter a URL]
Good DOS web sites:
http://www.dostips.com/
1 comment:
To Shutdown and reboot computer from the comandline.
shutdown -r -c "Rebooting for latest updates."
the -r is the reboot switch the -c is a comment displayed if needed
Post a Comment