Hello,
I run a DOS utility at my work that requires a password and properties file location be entered each time you run the program.
After executing the program there is a brief 2 second delay, then you are prompted for a password, then another 2 second delay, and then you are prompted to enter a path to the properties files.
Is there a way to run a batch file that pauses after execution, enters text and presses enter, then another pause, text, and enter?
I've searched a few forums and haven't found anything that worked, but admit to having very little knowledge of batch files.
Any help would be appreciated. Thanks!
Adding delays and carriage returns?
Moderator: DosItHelp
Re: Adding delays and carriage returns?
stogrady wrote: ↑03 Dec 2018 07:38Hello,
I run a DOS utility at my work that requires a password and properties file location be entered each time you run the program.
After executing the program there is a brief 2 second delay, then you are prompted for a password, then another 2 second delay, and then you are prompted to enter a path to the properties files.
Is there a way to run a batch file that pauses after execution, enters text and presses enter, then another pause, text, and enter?
I've searched a few forums and haven't found anything that worked, but admit to having very little knowledge of batch files.
Any help would be appreciated. Thanks!
Code: Select all
@echo off
set /P $passw=enter password:
set /P $path=enter path:
(
echo.%$passw%
echo.%$path%
) | findstr "%$passw%"
pause
exit
Code: Select all
enter password:best program ever
enter path:
best program ever
Druk op een toets om door te gaan. . .
Re: Adding delays and carriage returns?
Thanks very much! Most appreciated