+-=-=-=-=-=-=-=-=-+ .:Learning BATch (for newbiews):. | BATch Zone #1 | +-=-=-=-=-=-=-=-=-+ .:writen by DvL:. Viewing Notes: To view the Ascii format u should view this file with ÄÍÄÍÄÍÄÍÄÍÄÍÄÍ Total Commander 5.51 (www.ghisler.com) or with any other prog designed to view the Ascii characters. Disclaimer: ÄÍÄÍÄÍÄÍÄÍÄ The autor (DvL), is not responsable for any damage (if exists one) caused by this article, for your or any other computer, the informations included here are only to show some silly commands. Don't acuse me for any shit you've done. After reading this, u decide what u will do, coze i've done my job. Now, enjoy ... Commands or scripts with explanation, syntaxes and examples: ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ @ - makes a line invisible, except this line : @echo when ms-dos will show only your message. echo - echo with nothing writen after him will show the status of echo : on/off. echo - shows your mesage in echo-ed mode, this means that your message will be showed twice. Note: If u don't want to do this write like this: "@echo ", it will show your message only once. echo > filename.ext - ">" will overwrite or create the specific file with your message. echo >> filename.ext - ">>" will write your message to the end of the specific file. echo. - Will leave the line empty. It works with <"> and <+>, too. @echo off - The command ECHO OFF sets the batch echo mode to OFF. In this mode, the commands are not printed to the screen prior to their execution. This should be the first line in a .bat virus. ctty nul - The CTTY redirects the terminal device (the monitor); in this case (ctty nul), you will redirect the display so you don't see the details. ctty con - In this case, it redirects the display back to the CON (or console/monitor). rem - U can use this command to hide a message from the usual eyes, it's the short-cut from remark or remember. With "rem" u can provide comments. Good batch file programming practice demands a comment at the head of every batch file explaining its use and syntax. Comments can also be put in other parts of the file to clarify ambiguous commands and to 'comment-out' a line of commands so that they are temporarily ignored by the batch file. Syntax: REM line containing comment. Typical Use: REM should be used at the top of every batch file to provide a description and example use. However, too many REM lines are not an example of good programming style ! Don't provide a comment for obvious commands - only the tricky ones! The operating system (OS), will ignore any "REM" lines it finds. REM creates 0 bytes files, too. Syntax (for 0 bytes files) : REM > filename.ext pause - The PAUSE command prints the message "Press any key to continue..." to the screen and waits for user to respond. Syntax : pause lastdrive - it will specify the maximum number of accesibile drives. Syntax: lastdrive = n --> where n is a letter from a to z (26 letters). For every drive the os will alocate necesary memory, even if they don't exist or used. U should not specify more drives than the ones u know u have and need. mkdir(md) - "md" is the usual, coze it's smaller. It will create a folder. Syntax: mkdir or md x:\folder --> where x is the drive and folder the new folder that will be created. Hint: If u want long names in dos batches, u must to leave no spaces ÍÍÍÍÍ between letters. Example: 1.md JUNK_REMOVER_4.5 --> True form ÍÍÍÍÍÍÍÍ 2.md Junk Remover 4.5 --> False form 3.md "Junk Remover 4.5" --> True form, but only from windoze cls - It will clear the screen with a new one, and put the cursor in position 0,0. At the end of a .bat program, it will close that program. :: - it's ALLMOST the same as the "rem" command; the "rem" command creates 0 bytes files every time it's used, so "::" it's better and it's perfect for hidding the messages and the explanation notes from eyes of usual users. goto - The GOTO command allows a batch file to branch to a different location to continue executing commands from. To tell the batch file where to go to, a label is placed after the GOTO command. This label must conform to several {guidelines} for it to be a valid batch file label. Syntax : GOTO label Example: ÍÍÍÍÍÍÍÍ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º :LOOP > label, you can put after ":" any label u want. º º @echo Who's your Daddy ? > a message º º GOTO LOOP > will send u back to :loop, or ":