Friday, October 15, 2010

Batch Wait Command (Advanced)

The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

Home

Guides, Tips, & Help

Computer Features

Tech News

Internet Security

Ask The PC Expert

Suggested Software

Process Library

Computer Terms

Contact Us

Subscribe via Email

Subscribe via RSS



 
  A batch file is a file in the operating system that holds the instructions that the operating system has to perform. They are executable text files and are run by the system in a line-by-line procedure. They are an important part in the programming unit of the computer and are mainly located in the core blocks of computing as they contain executable statements that are regularly used by the operating system. They are more common in UNIX based system, where they are known as shell or shell scripts, than in windows based systems. Batch files are generally used by the system administrators to initialize repetitive processes. These files have the extensions such as - .bat, .cmd, or .btm. There is a subtle difference between the file extensions. The first one (.bat) is used by Microsoft for batch files and can be used by most of the OS, the second(.cmd) is to be executed in the command prompt and the third(.btm) by 4DOS and is much faster as it is loaded at once rather than the line by line loading.

Batch Files can be used to do plenty of things. Batch wait is an example of one such case. The implementation of the WAIT command in the batch file makes it to pause or wait for a specific number of seconds before proceeding further. This is of great use as it provides support to batch files which display some text providing the users time to read and also providing it time to connect with other resources.

One can apply the wait command in the batch file when there is a time period that is required to be attached to the batch file. It makes the batch file sleep for a few seconds before the work actually starts. The wait command does not work for UNIX, but works for Windows and DOS. There are different ways to implement the wait command. Since the operating systems do not come inherent with it, one has to create a file to implement it. The methodology is simple. First, a batch file has to be created with the following code:

@ping 127.0.0.1 ?n 2 ?w 1000 > nul
@ping 127.0.0.1 ?n %1% -w 1000> nul

This particular coding should not be used for real time processing as it is known to cause the batch file to run over for a few milliseconds. There is another provision in Windows XP and Windows 2003 as an alternative to using PING, there is a batch file SLEEP that can be successfully incorporated. For the SLEEP command, you will need the Windows 2003 Resource Kit.

Create a batch file with:

@choice /T: N, %1% >NUL.

Then there is a choice to make the file wait. Now, depending on the amount of time that you would want the file to wait, you can add the code. If you want a time lag of say 20 seconds, the code will be as follows:

ALL WAIT 20

The above code works completely fine for windows 95 and windows 98.

Web site and all contents ? Copyright ComputerTooSlow.com 2008, All rights reserved.Grand Rapids Computer Repair  Huntington Beach Computer Repair  Mobile Computer Repair  Moreno Valley Computer Repair   

View the original article here

No comments:

Post a Comment