![]() |
Batch Programming
hey guys,
I've always wandered about the use of batch programming,i know that they are Dos Commands in a text file saved as a .bat file,but what is the use of such files,and does any one use those now days??? |
Quote:
There's reasons for it, but generally for more complex stuff I try to use perl or something similar. Here's a list of some things I've made batch files for in the past: * I had to copy files from my computer to a test server rather regularly, but not all of them, only certain types, I created a batch file to copy these for me. * I often use remote/logical drives for different projects just to keep things easier, I'll often use batch files to set up the drives the way I want for a certain project (as I switch projects a bit) * I had one project where a file on a remote device needed to stay 'release' but often needed to be switched to 'debug' for debugging, I created a script to re-name the files appropriately when debugging with one click, and back again. Hope this helps... -MBirchmeier |
ya that helped MBirchmeier thnx :)
|
I use them almost daily, I primarily use them to launch my games in high priority without having to use the Task Manager. Or you can use them to delete certain files, batch rename, etc., the list goes on and on. Although it is very limiting.
I think every 'programmer' should have knowledge of how to use them, its so easy to create/use and quite useful/time saving. |
thnx AntiNinja,
i think i'll start learnig it. |
One thing I use them for regularly is copying directory trees at school. Many instructors put material on the college server, and it's a pain in the ass to point-and-click navigate to the right folder, and copy it over in the GUI. It's much easier to have a batch file on my USB drive, and double-click it.
Another thing it's useful for, particularly if you have a mobile computer that connects to different networks based on location, is mapping network drives. It's much easier to double-click the batch file/shortcut thereto than it is to type some lengthy NET USE command, or navigate the many clicks and keystrokes needed to map the drive in Explorer (I am assuming the share requires a password). Yes, sometimes you can set it up to automagically connect, but occassionally, this isn't appropriate (such as when you don't want to always be connected). Lastly, they're useful for utilities that use a command-line interface. You can write a batch file to repetitively call the utility for each instance of the task (say, each file you want to process), without having to tediously type everything out. |
I use them every day. Mine are primarily for programming environment initialization, because I do most everything from the command line. I have scripts that set all my environment variables; others that have all my compile/build functionality. Then there are the quick-launch scripts that I execute via the "Run" dialog, so that I don't have to move from the keyboard to the mouse to start certain programs.
|
thnx guys that was lots of usefull info.
|
You can learn more advance batch programming from the following URL address http://www.osix.net/modules/article/?id=755
|
| All times are GMT -5. The time now is 1:40 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC