Board logo

subject: Tech help tip on Batch Files for Budding Software Programmers [print this page]


Tech help tip on Batch Files for Budding Software Programmers

Batch files are text files that include commands to carry out particular jobs. In a normal notepad, you can write a batch program and save it with a .bat extension. Easy to execute, batch files can be very handy at times. Tech help experts while customizing your PC use often incorporate batch files. Examples of few batch commands are

Call

Echo

Exit

Endlocal

For

Goto

If

Label

Pause

Shift

Once you have written the batch file, all you need to do is just to run it on the command window when you want to execute your task. Batch files are very useful for carrying a series of executables.

You can think of batch files as a shortcut in Microsoft Windows or as an icon on the Mac operating system. Like a short cut, they can be used to run one or more commands and/or one or more programs. You do it through the command line.

Using a batch file, you can start a program. A good example of batch file is the autoexec.bat which loads each time the PC is loaded on MS-DOS and early Windows computers. Autoexec.bat included all the necessary commands and programs that would run MS DOS and Windows every time the computer booted.

As a novice software programmer, you can think of writing a simple batch command that will open a new word document or a word pad once the PC is booted. For deleting certain files or moving files to a different location, batch files can be used.

You as a user of Windows can use it to write your batch command. However, you must make sure that file extension ends with .bat. You can use any text editor such as Notepad or Word.

In the following example, you will learn to start notepad using a batch file command:

Use the command: START /MAX C:WindowsNOTEPAD.EXE

You can carry out number of useful functions using batch files at a touch of your fingertips. For instance, you can think of writing a simple batch code that will help hiding a folder.

As a software programmer, batch file is one place to start with your creative thinking and come out with user friendly functions for your PC.




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0