|
|
|
| Web Hosting Guide |
![]() ![]() |
Required Dos Programing, how to write code for dos - like *.bat |
Nov 23 2004, 10:03 AM
Post
#1
|
|
|
Newbie [ Level 1 ] Group: [HOSTED] Posts: 9 Joined: 23-November 04 Member No.: 1,488 |
All the information you'll need is in the help dialogs, just type "help" at the command prompt and it'll list all the commands available. Then just type a command followed by /? and it'll show all the help for that command:
C:\current_directory>echo /? For what you described above, you may want to look at "set", "if", "echo", "goto" for starters. A few tips: CODE type "set" to display a list of all system variables (DATE is a sytem variable!) use the "@" sign to turn echo off for the current line only you can use "%n" to pass variables into the batch file (ex: typing "mybat.bat blah crap", then in your bat file you can say if "%1"=="blah" start blah.exe if "%2"=="crap" goto crap here's a little code to get you started: CODE@ECHO off CLS ECHO:This is my batch file REM enter comments here IF /i "%1"=="skip" ( ECHO:You must not care what day it is GOTO endofprogram ) SET dayofweek=%date:~0,3% IF "%dayofweek%"=="Fri" ( ECHO:It's Friday!! ) ELSE ( ECHO:Nope, not friday yet ) :endofprogram ECHO: ECHO: PAUSE I'm sure there are some good tutorials out there, but this will at least get you started |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
4 | rapco | 4,410 | 7th December 2009 - 01:51 AM Last post by: iG-Oracle343 |
|||
![]() |
1 | vubook | 86 | 16th November 2009 - 03:54 PM Last post by: starscream |
|||
![]() |
1 | khan4lyfe | 136 | 29th July 2009 - 09:46 PM Last post by: tansqrx |
|||
![]() |
6 | Cain | 540 | 7th April 2008 - 12:45 PM Last post by: wutske |
|||
![]() |
2 | yungblood | 3,583 | 25th January 2008 - 02:33 PM Last post by: iGuest |
|||
![]() |
12 | dserban | 1,580 | 3rd October 2007 - 11:25 PM Last post by: .:Brian:. |
|||
![]() |
1 | jlhaslip | 1,569 | 19th September 2007 - 08:17 PM Last post by: tansqrx |
|||
![]() |
21 | tsakis | 5,446 | 20th June 2007 - 06:07 PM Last post by: MediYama |
|||
![]() |
14 | mtanoonymous | 2,813 | 30th May 2007 - 01:50 AM Last post by: matthewk |
|||
![]() |
5 | abartar | 1,007 | 11th September 2006 - 12:36 AM Last post by: jlhaslip |
|||
![]() |
11 | WeaponX | 3,739 | 9th September 2006 - 11:27 PM Last post by: WeaponX |
|||
![]() |
17 | Vyoma | 2,463 | 14th June 2006 - 05:05 PM Last post by: Vyoma |
|||
![]() |
1 | Omkar™ | 1,264 | 8th June 2006 - 11:52 AM Last post by: miCRoSCoPiC^eaRthLinG |
|||
![]() |
5 | Omkar™ | 1,344 | 6th June 2006 - 02:18 PM Last post by: vhortex |
|||
![]() |
1 | XIII | 805 | 30th May 2006 - 10:11 AM Last post by: finaldesign |
|||
|
Lo-Fi Version | Time is now: 19th March 2010 - 10:41 PM |
© 2010 AstaHost: Free Web Hosting & Technical Discussion, Free Web Hosting. a member of xisto.
Powered by Invision Board. Skin: IPB Forum Skins
Expand / Collapse Navigation



Nov 23 2004, 10:03 AM






