Create batch script file using comand prompt

Viewed 58

how to create batch file.

echo off
cls
(
echo TIMEOUT /T 0 > nul|set/p =please wait....
)
> "C:\Users\%USERNAME%\Desktop\test.bat"
exit

output : please wait....

how to make the output

TIMEOUT /T 0 > nul|set/p =please wait.... in test.bat

1 Answers

Escape the special characters so it will not be seen as the operators for the current batch, instead passed to the next batch file.

(echo @echo off
echo TIMEOUT /T 0 ^> nul^|set/p =please wait....
)>"C:\Users\%USERNAME%\Desktop\test.bat"
Related