Wait Command In Batch File Windows

Hey guys, I am new to hard core windows cmd line work and I have recently needed to install multiple programs on a couple of cleanly installed computers. exe still leaves much to be desired. Back in the old days of computing, I became very adept at. (*) Then write a batch file to call this file into your favourite editor where you may then insert the appropriate commands for the new batch file you are about to make. We also pass a specific non-zero return code. this is the reg file i've called Windows10. Example: notepad. Content: FTP batch file commands Windows. I am trying to write a batch script and trying to wait 10 seconds between 2 function calls. will delay execution of the next command by 10 seconds. AFAICT there's no easy way to wait for an arbitrary process to terminate from a batch file. To change the shortcut's icon simply go to Properties and Change Icon. BAT file to a powershell script. Unfortunately timeout. EXE is a command line tool which helps to run ‘windows update standaloneinstaller’. But how can I do the same through a batch file using any copy command line? There are two ways of doing it. Its at the end of the batch file the DOS command prompt window supposed to close but it kinda stays there after the last line is executed. I can manually change it via properties but that is not what I need for multiple windows. ica file will initiate the Citrix connection as normal. If specified (-w switch), PING will wait for a number of milliseconds between two pings before giving a time-out. The SAS SYST ASK statement (available in Windows and Unix environments) executes an operating system command as a separate task, for example: SYSTASK command “C:\SAS\SAS –input c:\SUGI30\Clients\XYZ\step1. So in that case, there is a batch file calling another batch file when MCC is called like in the example. Open Notepad. Batch files, which employ a legacy scripting language, possesses very simple, primitive and clumsy syntax. Now that the batch file has been created the next step is to use the Windows Task Scheduler to create a scheduled task to call the batch file. ica', and it doesn't wait, just goes to the shutdown command. To start a new program (not a batch script), you don't have to use CALL or START, simply enter the path/file to be executed, either on the command line or within a batch script. bat) can be used in Windows CE to perform simple scripting tasks. Windows batch file wait command keyword after analyzing the system lists the list of keywords related and the list of websites with related content, in addition you can see which keywords most interested customers on the this website. How to start excel from a batch file. Net stop service pause 10 Net start service. , without going through the Add/Remove Programs control panel). If you're new to the command line or need a refresher, see our how to use the Windows. - call another batch file - start a program and then wait for the program to close - call another batch file My goal with this is to work around an issue in Windows 10 where the screensaver won't work when I have my game controllers connected. 1 -n 1 -w 5000 >NUL For any MS-DOS or Windows version with a TCP/IP client, PING can be used to delay execution for a number of seconds. Batch file to run command every 10 seconds for 1 minute? Need help writing a batch file that issues a command to every file in a directory? In windows 7 under the command prompt, give me an example of how to write a batch file?. This means that the window will remain after the command has been run. COM files, so are incompatible with 64-bit Windows. One of the ways is to create a VBScript that will run the Batch File without opening/showing any window. (*) Then write a batch file to call this file into your favourite editor where you may then insert the appropriate commands for the new batch file you are about to make. For instance, using the following on the command prompt will pause the terminal for 10 seconds unless you press a key: timeout /t 10. A batch file is a collection of MS-DOS and Windows command line commands that can be run on a computer. Use the batch-file command Choice to make your batch files interactive. BAT to SH (bash shell script) converter to use the. pause echo Bye. Running a batch file is a simple matter of just clicking on it. bat extension. BAT file as a Windows Service. The call command accepts labels as the target of the call. How to Run a Batch File from the Command Line on Windows - Using Run Press ⊞ Win+R. The R programming syntax is extremely easy to learn, even for users with no previous programming experience. How to auto elevate a batch file to run it as administrator Sometimes you need to create a batch file which includes commands that require elevated rights. How to wait for batch file execution to be completed before continuing with rest of keyword tests Hi, I have a some keyword tests, but before they are executed, I need to run a batch file that gets the executable for my App. Therefore, the term batch processing is quite. In a batch file we can use loops (for), conditional statements (if), control statements (goto), etc. Use it to easily start, stop, pause or restart any service from an elevated command prompt, or in a convenient script/batch file. bat" to solve windows 10 start menu problem. It simply starts the executable. How to auto elevate a batch file to run it as administrator Sometimes you need to create a batch file which includes commands that require elevated rights. txt Hello World; Create a batch file with the following content called: DosFtpFile. This example batch file fragment checks to see if the user entered "quit" and exits if true. exe Will start them both and close the batch window instantly. jpg Create a Recursive Batch File in Windows. Most such programs are 16-bit. Do any of you. Uninstall - Uninstall a program from the command line. In the batch file I run a command if the command runs fine I exit out of the batch file if not I wait and retry the command again. exm' file, depending on the device this file is located in the IPSM or the. Try the following command: SLCheck -p 21 -a ftp. When a batch file is run, the shell program reads the file's instructions from top to bottom and performs any commands the batch file contains, normally line-by-line. (*) Then write a batch file to call this file into your favourite editor where you may then insert the appropriate commands for the new batch file you are about to make. Well, the batch file can be run by PRTG and Launcher as the previously pause command in your batch file worked !! When the batch file is executed by Launcher, no working folder is set. I have written a batch file and create task to run the batch file. Use pause to optionally terminate the batch file with at a safe place. AFAICT there's no easy way to wait for an arbitrary process to terminate from a batch file. DOS COMMAND-LINE SWITCHES A Short Discussion of Command and Program Modifiers. Introducing a new era of windows programming, Batch Compiler gives you a bunch of Advance Commands which are specially designed to do advance file, mathematical and logical. In essence, three separate copy jobs, one after the other. exe were added to Windows to make waiting in a batch file easier. this is the reg file i've called Windows10. A batch file simplifies repeatable computer tasks using the Windows command prompt. When you right click such a shortcut, it will include the context menu commands to pin to Taskbar or Start! Here is what you need to do. Most such programs are 16-bit. Batch file to run chkdsk If this is your first visit, be sure to check out the FAQ by clicking the link above. by Toivo Talikka · 14 years ago In reply to Xcopy and batch file Yes, the start method with /wait is 'supposed' to guarantee sequential or synchronous processing of commands. You can also add command line options if needed. The batch file saves your time by automating certain tasks for you that would otherwise require typing same commands on Command Prompt over and over again. yey! also, if you need to wait for a process to finish, i blogged about that here. Each operating system may react in its own way to any of these events. But to do the whole process silently, it's not possible with cmd/batch. › Batch File download command › Batch file: run command in a cmd. And [LENGTH] is the number of characters in the opposite direction of the starting point. Keep in mind I want to avoid using the "Open All in Tabs" feature of Bookmarks. Windows Batch Scripting: Return Codes (to exit the current batch script context, and not the command prompt process). Unlike other bat to exe solutions, Batch Compiler can handle complex batch scripts and compile batch files easily with the built in Intelli-Parse technology and Debugger. There is no simple native batch command or option to wait for a series of parallel processes to finish. Pretty sure you can use the TIMEOUT command, something like TIMEOUT /T 30. cmd file name extension. Simple batches (. This is a batch command that associates an extension with a file type (FTYPE), displays existing associations, or deletes an association. It also allows you to shutdown remote machines if you have the proper access, but for the purposes of this post, I’ll stick with local machines. Executing the batch file (or the shortcut) from Windows Explorer just opens a command window but does not run the commands within the batch file. The following command executes Unity in batch mode, executes the MyEditorScript. Batch File Commands: Pause, Delete, Sleep & More Windows batch files can be created with any basic text editor, but the most common one is Notepad. msu file name extension. A batch file (also called a batch program or shell script) is a executable program that contains a sequence of commands. User In Shows how to create, run, wait for, and delete a script from a batch file. I have written a macro in Macro Express to do that, but need to use a hotkey to activate it [rather than the other method which causes an endless loop]. Frog 7s Contributor. In general, any command you can run on a Windows system can be run from a batch file. But to do the whole process silently, it's not possible with cmd/batch. Do not use this option with the -r option. Call has no effect at the command-line when used outside of a script or batch file. BAT) Files to Taskbar and Start Menu - We know that we can pin applications, program shortcuts, etc to Windows Taskbar and Start Menu for quick and easy access but there are some limitations with. yey! also, if you need to wait for a process to finish, i blogged about that here. Clear cache using batch file for windows 7 and above To clear the browser cache which gets stored in the temporary location of the machine when the URL is hit on the browser using a batch file. Waitfor runs only on Windows XP and servers running a Windows Server 2003 operating system, but it can send signals to any computer running a Windows operating system. You can make folders without leaving Command Prompt with the mkdir command. But, in this case, you can double click it and see that the command prompt closes immediately after printing the message. The FILENAME statement temporarily associates a valid SAS name with an external file or an output device. Call has no effect at the command-line when used outside of a script or batch file. pause — Allows a break in the logical chain of your. In Windows Batch Dateien ist es machmal erforderlich, die Ausführung von Befehlen zu verzögern. Back in the old days of computing, I became very adept at. When a batch file is run, the shell program reads the file's instructions from top to bottom and performs any commands the batch file contains, normally line-by-line. Specifically I want my program to open a file with the default program and settings as stored in the Registry in HKEY_Classes_Root. Home › Forums › Scripting › General Scripting › Skip error in BATCH file and continue to next command. You can monitor your FTP Server by running SLCheck as a scheduled task, e. EXE" program. Line 2 gets the directory that the batch file is in. This will stop execution of the batch file until someone presses "any key". This is fine for interactive use, but sometimes we just want to delay the batch file for a fixed number of seconds, without user interaction. This can be important if you want to interact or see what is happening while the batch file is running but a bit annoying if you want to run the batch script quietly in the background or while starting windows. If you are writing a batch file and you don’t want to continue until somebody presses a key, you can do it really easy with the timeout command. Or you can create two batch files and use the runas command to call (run) the second batch file. Up until now, I had used the pause command to execute it after some of the other start-ups finished. exe Put that into test. Drag, and drop the batch file on to the interface. The simplest and most widely available without any additional programs is to use the ping command. Back in the old days of computing, I became very adept at. If you try to double click on a batch file in order to run it, then the commands that are present inside the file will be run in serial order. but if its like a normal batch or anything command line related. The parameter -n 5 means it will ping five times. exe processor; Bypass arithmetic limitations in batch files; Changing Directories and Listing their Contents. start expects the first argument to be the title. Due to the UAC function included in Windows since Windows Vista, when start a batch file, it opens without the required access rights unless you right click it and select "Run as. However, it is often desirable to execute a particular section of a batch file while skipping over other parts. DOS batch files (. Converting DOS Batch Files to Shell Scripts. • Local Computer Policy - Computer Config > Windows Settings > Scripts > Shutdown • Point it to the location of your batch script file. MS-DOC batch command wait, until the previous task is complete a batch file or. The term "batch. The wait command does not work for UNIX, but works for Windows and DOS. Windows 7 - How do I make a batch file wait / sleep for Superuser. exe to run a batch file elevated. Not too keen on the batch file language quite yet but if anyone could offer some help I would really appreciate it. In a nutshell, it is a script file used to automate tasks in DOS, Windows, and OS/2 operating systems. START /MIN CMD. If you want the output to be saved to a file, re-write the command as follows: ping ipaddress >> C:\(path to the file). You can set your batch file to wait until the user signals he or she is ready to continue, or you can set your Use the PAUSE. Most such programs are 16-bit. Drag, and drop the batch file on to the interface. Here are simple steps to do that. Use the batch-file command Choice to make your batch files interactive. After the message prompts you to put a new disk in drive A, the pause command suspends processing so that you can change disks and then press any key to resume processing. They should be saved as ASCI files and should. This command is used to execute Windows Defender scans from the Command Prompt. The simplest and most widely available without any additional programs is to use the ping command. exe were added to Windows to make waiting in a batch file easier. But, it can also have logic and branching elements. Here's a list of all available command line switches using the Windows 10 setup. That batch file you were provided with could not have installed all of your. ps1 with your. pause echo This is my second batch file program. com after your functions is performed. How do I add sleep in a batch script for X seconds? This will stop the script execution for the defined number of seconds. Each operating system may react in its own way to any of these events. Or, if you are using command line copy, you can answer N to bypass these files that are already existed. How to pause a batch file for 30 seconds. Getting started with batch-file; Add delay to Batch file; Batch and JSCript hybrids; Batch and VBS hybrids; Batch file command line arguments; Batch file macros; Batch files and Powershell hybrids; Best Practices; Bugs in cmd. TIMEOUT 5 was included in some of the Windows Resource Kits, but is now a standard command in Windows 7 and 8 (not sure about Vista). In some situations, you may want to have only the "outermost" batch-file behave differently if it is executed from a "Command Prompt" versus if it is run by clicking on the the batch-file (or the batch-file shortcut) from "Windows Explorer". This tutorial describes a simple. DOS batch files have the. Unfortunately timeout. But, in this case, you can double click it and see that the command prompt closes immediately after printing the message. exe and the associated commands, and how to write Windows batch scripts for the interpreter. Home › Forums › Client Operating Systems › Windows 7 › batch file to enter password in a command prompt This topic contains 2 replies, has 3 voices, and was last updated by Anonymous 3. Commands in the batch file can instruct the command processor to interact with the user, i. I have a small batch file that runs one-step-at-a-time on a Windows XP computer, but my Windows 7 computer blasts through all the commands in the file without waiting for the previous commands to finish, so my file transer/copy isn't done and it's already onto trying to rename the file and/or move it somewhere else. Getting Started with Windows Batch Scripting. bat) script that has several commands in it. In Windows, you can create a batch file using the steps below or the steps mentioned in the MS-DOS command line section. The Server 2003 Resource kit has a file named sleep. So to if we want to delay the cmd or our commands we can use a loop to achieve that or the ping option. Do any of you. Now that the batch file has been created the next step is to use the Windows Task Scheduler to create a scheduled task to call the batch file. The Shutdown Command. Copy your file from the desktop and paste it in the Startup folder. Click Open. Wait Command, Wait, Batch file, cmd file,. Batch files are non-formatted textual command files, from which the COMMAND. How to Run a Batch File from the Command Line on Windows - Using Run Press ⊞ Win+R. PING — Pauses the batch file until the file receives a return ping from a specified computer address. Right click on the Desktop and select the command "New -> Shortcut" from the context menu. The first ping happens at t=0 and there’s a time delay of 1 second between each ping so that gives us a 4 second delay where our batch file seems to be doing nothing. I don't want to find the proper file each time I want to do something with this SDK, so I created batch file:. To create a batch file, all you need to do is create a new, plain-text file with the. EXE does not wait for the application to terminate and control immediately returns to the command prompt. Command line interpreter takes the file as an input and executes in the same order. because i am scheduling the batch file to run automatically. I am using the PC for media playback / gaming in big screen and rarely see the desktop. The Server 2003 Resource kit has a file named sleep. From here, you'll need to determine how you want to delay your file using 1 of 3 commands. It is used within a computer batch file and allows the computer to pause the currently running batch file until the user presses any key. This program can be used in batch files and as a custom action in installers. Batch file to run command every 10 seconds for 1 minute? Need help writing a batch file that issues a command to every file in a directory? In windows 7 under the command prompt, give me an example of how to write a batch file?. exe /internal TIMEOUT /T 2 /NOBREAK DisplaySwitch. DOS batch files (. Ping any URL or web site with our free command-line utility, http-ping Easily find out if your web site is responding and how it is performing http-ping is a small, free , easy-to-use Windows command line utility that probes a given URL and displays relevant statistics. Normally, normally these files have an extension of. Documents details of the user interface and the SAS language that are specific to the Windows operating environment. png" [/code]translation: wait 2 seconds, take a screenshot and save it as shot. pause echo This is my second batch file program. Leider ist die Unterstützung dieser sleep und wait Befehle abhängig von der verwendeten Windows Version sehr unterschiedlich. You would have to compact the audio file into same folder as the batch file. MS-DOS or any version of Windows. TIMEOUT - Delay execution for a few seconds/minutes (for use within a batch file). EXE command should be in your toolkit. Home › Forums › Client Operating Systems › Windows 7 › batch file to enter password in a command prompt This topic contains 2 replies, has 3 voices, and was last updated by Anonymous 3. The wait command does not work for UNIX, but works for Windows and DOS. Another point is that WinRAR doesn't appear to install to the Windows path environment variable, so it must be specified either at a command prompt, set permanently in the environment variable settings, or specified in a batch file (WinRAR v3. To make a timeout that lasts exactly one minute we type:. PAUSE, SLEEP, TIMEOUT, PING, NETSH (Windows XP/Server 2003 only) The most obvious way to pause a batch file is of course the PAUSE command. Another point is that WinRAR doesn't appear to install to the Windows path environment variable, so it must be specified either at a command prompt, set permanently in the environment variable settings, or specified in a batch file (WinRAR v3. Use the batch-file command Choice to make your batch files interactive. exe, and is user to set a command file to wait for n seconds (like the timeout command), and its usage is simply sleep 300 which would make the batch file pause for 5 minutes, so if you wanted a command file/program to run every 5 minutes you could write a batch file with the following (name run5. > The pause command is never executed. Usually when batch file calls another batch file directly like in the example, they don't handle back the control to the called batch file. This is a batch command that associates an extension with a file type (FTYPE), displays existing associations, or deletes an association. cmd Hello, I am new to DOS and scripting. The general answer is to use the START command with the /WAIT option like this: start /wait notepad. This allows batch scripts to run commands and take actions based upon sets of conditions, such as the time of day. For example, if you want to run a batch file called X. BAT batch file as follows: CALL WAIT 10. Batch File - For Command?? Hi, Sorry if this is not the place but does anyone know how to do the following? I am trying to create a batch file to search a directory for a specified file type and list it in a text file then get the batch file to read that text file and copy all the General Discussion. And [LENGTH] is the number of characters in the opposite direction of the starting point. The second line creates a text file, flag. Use batch parameter expansion to avoid parsing file or directory info Batch file parameters are read as %1, %2, etc. The simple fact is that batch files are still much easier to create and edit than WSH scripts or PowerShell scripts. Welcome to (HACKING begins - "An approach to introduce people with the truth of HACKING"), Hello friends, Today in this post I'll show you how can you prank or make fake viruses using batch files, In my earlier post I'll introduce you with the BEGINNERS GUIDE TO BATCH PROGRAMMING, here you find some basic about batch file, now begin with some programs in batch file so with the help. To save the command output to a file in a specific folder that doesn't yet exist, first create the folder and the run the command. Running a batch file is a simple matter of just clicking on it. I have three batch files that I'd like to run in parallel/asynchronously. When the end of the file is reached, the file exits to the Command Prompt if it was invoked from there, or the console window closes if it was invoked from Windows Explorer or the START command. Batch files for DOS, OS/2, Windows 95/98, NT 4, 2000 and XP. Batch files are small files which can run commands via your computer's built-in. No Commands & Description; 1: VER. On the command line, CMD. REM Next command displays "Press any key to continue" and waits for user to press a key. bat file into the directory of your choosing. Windows 7 Batch File Timeout Command How to delay or pause the execution of batch files. TIMEOUT - Delay execution for a few seconds/minutes (for use within a batch file). For users of Windows XP and Vista, you can download it from the downloads area of the Microsoft Scripting Center. MS-DOC batch command wait, until the previous task is complete a batch file or. Went looking online for the answer and was surprised it was not a well documented process. In a perverse twist, the created script has to in turn create a batch file of it's own in order to communicate results back to the original batch file. If you're new to the command line or need a refresher, see our how to use the Windows. This file allows you to shutdown or restart Windows from a command line, or batch file. Enter the following command: ping ipaddress (replace ipaddress with the IP to be pinged) 3. For example: Given the following code snippet, the test to see if DEST. Get System Information on command-line mode July 21, 2008 Administration 16 Comments There is a built-in command on Windows XP and Windows 2003 which can gather system configuration information to display in command-line mode. ### ### Sample Wget initialization file. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc. not responding), DLL name, or service name. This will ask user to press any key before continue moving to next command. Windows xp users can download windows resource kit tools for obtaining sleep command. bat) in Windows. To stop it from closing we need to use a built-in command, that is the “pause”. I am trying to write a batch script and trying to wait 10 seconds between 2 function calls. However: start notepad. Greg Shultz shows how it can come in handy even in Windows 7. It makes the batch file sleep for a few seconds before the work actually starts. If you try to double click on a batch file in order to run it, then the commands that are present inside the file will be run in serial order. An external file is a file created and maintained in the Windows operating environment from which you need to read data. Your batch file runs a Windows program, but you need it to not do anything else until after that Windows program finishes. txt file extension, it should have a. Unlike other bat to exe solutions, Batch Compiler can handle complex batch scripts and compile batch files easily with the built in Intelli-Parse technology and Debugger. When you close it, calculator will run. • Local Computer Policy - Computer Config > Windows Settings > Scripts > Shutdown • Point it to the location of your batch script file. Source: Wikipedia. Use batch parameter expansion to avoid parsing file or directory info Batch file parameters are read as %1, %2, etc. A batch file can also be automatically executed when the terminal boots using the 'AutoRun. exe files, one after another. by Toivo Talikka · 14 years ago In reply to Xcopy and batch file Yes, the start method with /wait is 'supposed' to guarantee sequential or synchronous processing of commands. Windows Xp Batch File Commands Wait You can set your batch file to wait until the user signals he or she is ready to continue, or you can set your Use the PAUSE command to make the program wait for the user. Next, create a batch file that is one folder up from this location. Bash: wait - Wait for a process to. Execution starts at the top of the file and ends at the end. This versatile, essential tool has earned its reputation as the “Swiss Army Knife” for Windows Services!. exe /external I've tried putting a shortcut to it in. The -w 10000 part specifies the desired timeout in milliseconds. There maybe number of reasons why you may want to "sleep" in a batch file. In other words if you do not supply the full path to PSExec, the batch file will not be able to find it. Open Notepad 2. My guess is I need to use background jobs in some manner so my code might look like this:. Creating a batch file in Microsoft Windows In Windows, you can create a batch file using the steps below or the steps mentioned in the MS-DOS command line section. All that is not a problem, but I really wanted to add some house cleaning functionality as well. Ping any URL or web site with our free command-line utility, http-ping Easily find out if your web site is responding and how it is performing http-ping is a small, free , easy-to-use Windows command line utility that probes a given URL and displays relevant statistics. Easy enough. Having command prompt open is OK if the window doesn't show. COM files, so are incompatible with 64-bit Windows. but this is not actually starting the service. If not instructed differently the command processor echoes each command from the batch to the window before executing it. EXEC master. We also pass a specific non-zero return code. It has extension of. A Windows batch file is a special type of script that can be run by the Windows command line tool, known as cmd. (*) Then write a batch file to call this file into your favourite editor where you may then insert the appropriate commands for the new batch file you are about to make. In Windows XP we can make use of a command from the Windows 2003 Server Tools called "Sleep". Leider ist die Unterstützung dieser sleep und wait Befehle abhängig von der verwendeten Windows Version sehr unterschiedlich. DOS batch files (. If I REM out the shutdown command, the. The following command executes Unity in batch mode, executes the MyEditorScript. EXE command should be in your toolkit. START /MIN CMD. exe However, some programs still won't "wait" properly. Syntax TIMEOUT delay [/nobreak] Key delay Delay in seconds (between -1 and 100000) to wait before continuing. To my surprise, the Pause command does not work. exe cmdwait 2000 savescreenshot "f:\temp\shot. All you had to do back then was insert a pause command in the middle of the batch file; at that point, the batch file would halt and – like a faithful old dog – just sit there and wait for you to press a key on the keyboard. cmd) featuring infinity loop for executing netstat command endlessly to capture established connection (can be stopped by CTRL+C to terminate. It has extension of. Also, we can run one batch file from another batch file using the CALL command. To make your script pause simply use the PAUSE command. Or you can create two batch files and use the runas command to call (run) the second batch file. really end the pause without looking into. It is possible you are referencing a command or a 3rd party utility that no longer exists. For complex batch files, this can be very distracting, as page after page of commands and messages scroll by. exe file, as suggested by other respondents. Back in the old days of computing, I became very adept at. Ping any URL or web site with our free command-line utility, http-ping Easily find out if your web site is responding and how it is performing http-ping is a small, free , easy-to-use Windows command line utility that probes a given URL and displays relevant statistics. As soon as you pressed a key - any key - the batch file would resume again. Place this in your batch file, and when it's reached, the Command Prompt throws up a 'Press any key to continue' message. but if its like a normal batch or anything command line related. Specifically I want my program to open a file with the default program and settings as stored in the Registry in HKEY_Classes_Root. Use the -batch option in non-interactive scripting or command line work flows. Most such programs are 16-bit. exe , you can include the above command in any location you can execute a program, such as a shortcut icon, Intranet web page anchor, script, etc. To use them in aliases or at the prompt, you need to define the DO on a single line, and enclose the body of the DO loop in a command group following the DO expression. The batch file contains console instructions for the computer to follow; by placing it in Windows' Startup folder, it will run every time a user logs on to the computer without requiring any. Source: Wikipedia. Do you know how to use the Command Prompt? If you do, you can write a batch file. Press any key to continue. In some languages, the command would be WAIT, but DOS and Windows do not come with this command for batch files.