.bat or .cmd files

i have seen persons making .bat or .cmd files and doing tricks with them on computer.i too have done a lot of them but what i wanted to know is there any language in which they are written,if not(which should not be as i think) then what syntax they follow and how can one can get command on them.

^^What exactly do you want to create a .bat / .cmd file for ?? .bat files usually accept DOS commands.
I had once made a .bat file to do a simple copy of multiple files to one file in binary mode and once made a file to connect to a FTP server using a hardcoded id and password and GETting a file from a predefined unix directory.

what i want to know is how to make these files on my choice to do specific tasks and if they accept DOS commands then can you tell me the place to learn them as what i understand from looking into these files is that they are very useful in nature if properly used so i want to learn every bit about them.

Batch file - Wikipedia, the free encyclopedia

search for “batch scripting” for more links. As the commands are OS specific, a same .bat file might work differently on WinXP and on Win7.

For a .bat file, you can view/edit it using notepad or any text editor and add/remove commands.

i have found a lot on this in recent days by a little bit of searching and hope i will start making these files on my liking soon.

AFAIK bat and cmd files types are collection of dos commands written so that they can execute without any intervention

here is a sample of a bat locker file

************************ 
echo.
pause
goto end 
:MDLocker 
md Locker 
echo Locker program successfully executed
goto End 
:End

To use this just copy and save this code as <any_name>.bat
and the default password is “password”

— Updated Post - Automerged —

You can refer this Batch file - Wikipedia, the free encyclopedia

i have copied this and create a .bat file but i am not understanding how to use will you elaborate a bit

Ok here is a small explanation

i hope this is clear

i got it and really works and was nice i can lock any of my data and no body is going to think of this but what i want to ask from you is that how do you learn to do all this as i want to write these programs on my wish

^^no specific answer for that, just reading and surfing :wink:

there is no magic pill to do this in an instant. Practicing a lot is the only way. Start with the basics of scripting. Try chaining multiple commands, reading input from user, using iterations etc.

Google is more than enough for you to start learning this. Make up a problem which you want to solve and find the solution yourself. If you are having trouble finding answers, ask more questions, even stupid ones. Someone will point you in the right direction.

i know there is no magic pill and i even dont want it and what you sugest me i have started it before but i think there is certain criteria to do these things but since i know what to do more clearly i will try more and hope on a day i will do things on wish.thanks a lot to you guys for your help.