| | Very nice tutorial, I tried it and I've a lot of use from it. I now use it for some routines that always annoyed me to do manually. Anyway just very nice. -=jeroen=- |
| Nov 22, 2009 |
nice tutorial, I really needed it for launching Java applications on Windows (
For example, I can do system service startup and shutdowns with shell scripts without typing the long command lines over and over again. CODE echo "Please enter the root password to restart the network" su -c "/etc/init.d/network restart" echo "Done!" *This code only works on SuSE Linux. xboxrulz
Wow! Another programming language!
~souradipm
I remember making a batch file to start a service and a few programs when windows started because one program would only run when the other was started and it made it easier, it's also a great way to learn windows shell commands and practise windows scripting.
In my experiences the dos prompt will actually hold more power than the simple explorer.exe which makes it a very handy tool if you know how to use it -HellFire Here's the batch that I've user, I name it myserver.bat CODE @echo off set me=myserver.bat - (c) copyright 2006 - Rio Astamal if "%1"=="start" goto start if "%1"=="stop" goto stop if "%1"=="" goto usage :start echo Starting server application server... net start apache2 net start mysql net start hmailserver goto quit :stop echo sutting down server application... net stop apache2 net stop hmailserver net stop mysql goto quit :usage echo usage: echo myserver start/stop echo ------------------------- echo note: start to activate the server and stop to shutdown the server. echo . echo . echo %me% goto quit :quit if "%2"=="yes" ( exit ) myserver.bat have 2 argument, the first one is for start/stop the server and the second argument (optional) wheter user want to quit the command prompt or not.
I wouldn't call batch files a programming language, but just command files working in console.. why not a programming language? because of mathematics it is able to do, it only recognizes simple numbers like 1,2,3,4.. [-9999999999;+999999999]; And the tools which can compile your bat file to exe is quite ridiculous, usually the compiled version takes 10 times more space than source
Say REXX is a more advanced command file scripting, which is capable of much more.. so I could call it (REXX) a scripting language..
I love this, I often need to end about 5 processes, delete one or two folders, and start three programs.
1. In one folder I want to delete, one of the files is now obsolete, but Windows still loves it. Can I avoid it or delete it through batch files? 2. How do I end a process in these?
Batch files were great. I remember when I was younger I used to try and teach myself how they worked by editing them/making my own. Typically they are now used for installers, etc. Most virus scanners DO however pick up non-system batch files, as they can be programmed for malicious purposes.
I remember my friend didn't want his younger brother on his computer, so he made a batch file that shut down the computer when executed. Lets just say he put it in his brother's startup folder and his brother was pretty pissed. They can, however, be used to complete simple everyday tasks without extensive programming knowledge.
Problem
Batch Files Trying to add this into a batch file I am working on, but it is not really working for me, it just closes out the second it comes in..Any help? @echo off Echo test Pause >nul Echo =============================================================================== Echo � �============================================� � � /\ /\ � Echo � � | | | | � � � | | | | � Echo � � | | | | � � � | | | | � Echo � � / \ � � � | O O | � Echo � � | | � � � | <__> | � Echo � � | | � � � \_______/________________ � Echo � � | \ � � � \ \ � Echo � � \________ \ � � � / | � Echo � � / ________|******* � � � ___ __/ / |******** � Echo � � | / |********* � � � | / |******** � Echo � � |______________/___________|******* � � Echo � �=========================================� ============================================================================� Pause >nul -Scott
Similar Topics
Keywords : batch, files, tutorial
Get user input from vbscript (3) Hello, I didn't see a tutorial on this subject so i'll go ahead and do it. Long ago I used Looking for batch, files, tutorial
|
![]() Batch Files - Tutorial |
Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com