Adding delays and carriage returns?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
stogrady
Posts: 2
Joined: 03 Dec 2018 07:35

Adding delays and carriage returns?

#1 Post by stogrady » 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!

Ed Dyreen
Expert
Posts: 1527
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Adding delays and carriage returns?

#2 Post by Ed Dyreen » 03 Dec 2018 10:41

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.

stogrady
Posts: 2
Joined: 03 Dec 2018 07:35

Re: Adding delays and carriage returns?

#3 Post by stogrady » 03 Dec 2018 10:48

Thanks very much! Most appreciated

Post Reply