answersLogoWhite

0


Best Answer

You can use the TIMEOUT command, which paralyzes the batch file from running further commands until the timer runs out or if the user presses a key.

Here's an example:

@echo off

Commands here

TIMEOUT 10

Commands here

exit

The file will run whatever command you want it to run, then it will halt all running commands until 10 seconds passed, or if the user pressed a key before the timer runs out. Then, it will run any other commands you want to do after the delay, and then exit out.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do I add time delay in a batch file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is Batch File Maker?

you can use notepad for creating a batch file. just when you save the file that you made, add .bat as a file extension. like this: "sample.bat".


How do you add any file in to startup list with batch file?

You'll need to use the copy command and copy files you want to add in startup into the statup folder via the batch file, but you need to list the file(s) you want to copy and map the location of the startup folder depending on your computer type.


How do you run batch file for xp pro that starts every time the computer starts and runs this in command prompt ROUTE ADD 192.168.17.0 MASK 255.255.255.0 192.168.1.2 -p?

To run a batch script automatically every time the computer starts, schedule it in Task Scheduler.


How do you name a batch program?

Assuming you mean a shell script (AKA batch file), you simply add a .bat as the extension to any plaintext file. There is no limitation for the actual filename aside from this (except for regularly unallowed charachters like > and /). For instance, if you wanted to name your batch file hello world, you would open up a new notepad document, enter your code, then save as File Name: hello world.bat and change the Save as Type: All Files. Windows automatically recognizes any file with the .bat extension as an executable batch file, so to run it, you would just double-click it like any other document or file. To edit the batch file again, you can right click it and select Edit, or use notepad to open it from its respective location. Hope that answers your question.


How do you add comments in batch files?

Anytime you wish to create any type of remark in a batch file rem must be added in front of the line. Remarks are often used to skip a line in the batch file or make comments.


How do you save a batch file?

Open up a notepad.Type in the the batch parameter you need to run.Then save it as a .bat file.File > Save as > myfile.batExample:If you need to to copy a file (filename picture001.jpg) in C: drive to the D: drive, you can create the batch to do the task by typing the following parameter in the batch file.xcopy [path of the file] [destination path]xcopy C:\picture001.jpg D:Now save it as a batch file and double click to run it.Enjoy!


How do you transfer music to a media movie?

Basicly its like this:- Inside the program you choose to use (movie maker or premiere etc, you add the video media file into the job batch then drag it onto the time line on video1 line, then add the audio file onto audio line 1 and edit and merge accordingly. then finally you export in the desired format you require -Cheers


How you can make a batch file which delete a directory on booting?

REM deletes a file C: del filename exit Create a file, above, using wordpad and save it with the extension .BAT Modify the line C: del filename, to indicate where the file is and instead of 'filename' write the name of the file you want to delete. (REM is just a remark to remind you what it does..) Say you call the batch file 'deleter.bat', then you have to include this file name in the startup program file. This will depend on what operating system you are using. Old DOS, would use an autoexec.bat file. You could then actually add the delete command in with the autoexec.bat file.


How can you get sound for pivot animator v3?

you save the animation as a GIF file, then open Windows movie maker, import the GIF file, then add it to the time table. now import the sound file and add it to the time table too, and just sync them. save the file as video file and your done!


What time do you go in for school if its a three hour delay?

just take the time you have to be at school and add 3 hours to it like my school i have to be there by 8:05 but on a 3 hr delay i have to be there by 11:05 so kick back and relax


What are the synth settings for time Pink Floyd?

Start with sustained sawtooth, tweak as desired and add a little delay and reverb.


Can you add more sugar after a batch of jam is canned?

You can rewarm the batch and add additional sugar, but you will have to go through the entire sterilization/canning process again to preserve it beyond a couple of weeks.