Batch commands

by pietman 13. July 2010 11:43

COPY %windir%\filename a:

SETLOCAL
..... set vars only local to batch file
ENDLOCAL

START .....
/minimized or /m
/maximized
or /max
/restored
or /r
/wait
or /w

IF EXIST some.txt COPY c:/some.dll %windir%/SYSTEM/some.dll   (IF NOT EXISTS)

IF ERRORLEVEL 4 ERASE trashfile.tmp /P

IF %M%==1 GOTO SavedIt
:SavedIt

FOR variable in (set list) DO command .... or DO ( ... commands ... )
FOR %%D in (SYSTEM, COMMAND, SHELLNEW, "Start Menu") DO DIR "%windir%\%%D" /W

SET /P M=Type 1, 2, or 3, then press ENTER:
IF %M%==1 GOTO EXPORT
IF %M%==2 GOTO IMPORT

dir /s /f (recurs, files only)

Tags:

Add c0mment




  Country flag
biuquote
  • Comment
  • Preview
Loading


About ...

pietman celliersPietman Celliers
Bitlink  Ltd
bitlinkit.com