Page 1 of 1

How to Code .Bat Files

Posted: Tue May 08, 2007 10:38 pm
by ag3nt
Hi all.

There is a method that you can create basic applications with it.Yes its batch language.Create a blank text file and name it appname.bat and open it with notepad or any text editor.Now i will teach some codes about it

Commands List:

md
md foldername : Creates a blank folder with selected name.

rd
rd foldername : Deletes a blank folder.

del
del filename : Deletes a file like ("c:\x.txt")

can be used like
del *.txt
del *.*

echo
echo somethinghere
Writes selected text to screen.
echo off
If you write this to top of .bat file user cannot see commands when execute your application.


@echo
Same with echo but user doesnt see echo command when you use this.

dir
Lists all files in the app directory if no parameters set.

call
call otherapp.bat: Opens another .bat application that set in parameter.

start
start filename.extension: Opens another application with any extensions set.
And this opens things in new window.

cls: Clears the screen

ren
ren filename newname: Renames the file with a new name.

type
type dosyaadi: Includes a files text to your application.

Example:
type ****.txt

move
move filename filename: Allows coder to move a file.

exit
Ends program.

Written by ag3nt.

Posted: Thu May 10, 2007 4:17 am
by SHAdmin
Your 'How To' has been approved and you have been credited 15 points for sharing it.