Page 1 of 1

Adding delays and carriage returns?

Posted: 03 Dec 2018 07:38
by stogrady
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!

Re: Adding delays and carriage returns?

Posted: 03 Dec 2018 10:41
by Ed Dyreen
stogrady wrote:
03 Dec 2018 07:38
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!

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. . .
You can also use stackey program.

Re: Adding delays and carriage returns?

Posted: 03 Dec 2018 10:48
by stogrady
Thanks very much! Most appreciated