Named parameters are enclosed in percentage signs, as in %name% while input parameters are numeric and use only one percentage sign, as in %1.
In command prompt there is no direct support for timed wait command. However, there is Choice command that has a time parameter that indicates how long it should wait for selection. This can be used for timing.
In Windows 7 this can be done in the following way (in this example we wait for 5 seconds):
CHOICE /N /C Y /T 5 /D Y >NUL
call anotherfile.bat
%CD%
Use PUSHD/POPD to switch directories.
Example of conditional branching:
@ECHO OFF
:TOP
IF (%1)==() GOTO END
ECHO Value is "%1" and still running...
SHIFT
GOTO TOP
:END
See attached if.cmd.txt file for example.
See attached script.
References: