Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Batch .bat Files


9 replies to this topic

#1 AlternativeNick

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 210 posts

Posted 06 August 2006 - 04:13 PM

sorry, im not really sure where this would go, as im just starting to hear alot about them and dont know what language theyre in.

i had just a few questions tho,
  • What language are .bat files written in?
  • Is there a way to run them without the black box popping up?
  • what are some of the things that you can do with them? i know about ftp stuff, but i havent done much else :S


#2 shadowx

    Live your life so that in death you may stand side by side with your gods. Not at their feet.

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1,674 posts
  • Gender:Male
  • Location:Essex, UK
  • Interests:Photography is a big interest, i have some photos up at my site, apex photographs (http://apex-photographs.com). Using my Lumix g1 to take the photos of course! <br /><br />Um computer games... photo editing and thats about it!
  • myCENT:68.57
  • Spam Patrol

Posted 06 August 2006 - 04:30 PM

others can correct me if im wrong but i belie .bat files (Batch files) are just a collection of commands that run in DOS on windows so technically theyre not written in any programing language as they arent a program as such just commands for another program.

And i dont think there is a way of stopping the black box coming up becuase the black box is MS-DOS which is what takes the instructions you write into the batch file and does whatever they tell it to do.

As for what it can do i dont think its very much, its usually used for recovering a computer if everything goes wrong and you can use DOS and batch files to try and fix things because they dont need windows to load to work also i use them to shutdown faster sometimes just one line of commands can shutdown my computer a lot quicker than the usual way.

they can be used for things like telnet and other DOS applications and for checking network configurations and things like that but overall batch files are only really usefull for technicians and techie minded computer users rather than for a general home user who wants to do office work or play games, they are usefull for things ive already mentioned though. I think you can find a list of the uses and commands by searching for MS-DOS commands in google


But like i said i might be wrong so others please correct me but i think im right!

#3 brandon10092

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 152 posts

Posted 07 August 2006 - 08:47 PM

Batch files are written as simple "phrases" that your computer recognizes as commands when you save your file as .bat. For instance, open up Notepad. Then type in command.com, (without the comma) which is the phrase that tells the computer to open up command prompt. Then go to File-Save As-then save as whatever you want, and at the end, type .bat, and make sure where it says Save As Type you select All Files. Then open the file up and it will open up Command Prompt. If you do some research online you can find and memorize a simple list of commands to put in a batch file and pretty soon instead of opening up Command Prompt and trying to configure your IP address, you can simply write a batch file that opens it up and it does it for you.


@echo off
:A
Cls
echo MESSENGER
set /p n=User:
set /p m=Message:
net send %n% %m%
Pause
Goto A 

If you save that in a batch file, you've just created an instant messenger that runs through Command Prompt, and all you need is your friend's IP address.

Edited by BuffaloHELP, 07 August 2006 - 08:55 PM.


#4 Galahad

    Neurotical Squirrel

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 590 posts
  • Gender:Male
  • Location:Novi Sad, Vojvodina
  • Interests:Programming, Hardcore dance/Trance/House music. Girls, girls and more girls ;) ... In short, everything youg people like, I like :D Oh yeah, and dont't forget politics :)
  • myCENT:48.25

Posted 09 August 2006 - 11:29 AM

.BAT (Batch files) can be looked upon as a shell scipt, because, that's wtah they actually are... Theya re plain text file, with simple structure, and a list of commands that operating system has to execute... These commands are not really commands, such as found in programming languages, but rather, OS commands, and program names... So, for example, you could set some temporary environment variable, and then execute some game, and after that game exits, clear that variable...

Batch files could perform simple branching, variable comparisons, text input, OS command execution, and program execution... Try to obtain manual or help files for MS-DOS 6.22... You can find more info there, on batch file specific commands...

.BAT files were uses while MS-DOS existed, and were useful, if you had to do same operations constantly, to avoid typing the same sequence of commands over and over again... Since MS-DOS no longer exists (it's only emulated in WindowsXP), and due to graphical operating system, .BAT files lost some of their use... They still do the same thing, they did years ago, but are obsolete now...

Think of batch files as a form of Unix shell scripts...

#5 beeseven

    Privileged Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 629 posts

Posted 18 August 2006 - 12:47 AM

At one point I was looking up things you can do with them and different commands you could use, and I found this: http://www.computerhope.com/msdos.htm. It's a big list of all the DOS/command prompt commands, what they do, and how to use them.

Edited by beeseven, 18 August 2006 - 12:47 AM.


#6 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 15 December 2008 - 01:57 PM

um potatoes and actually its just the obsolete version of dos  it is for back up perpouses only if you really want to mess of have fun with something just use regular dosit is really kind of useless unless you want to back up some files or recover them also it is the "quick and dirty way"  to edit txt files



#7 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 12 October 2009 - 01:57 PM

yeah, ms-dos batch files are still used for about everything, and can be modified to do just about anything, seeing as the mainframe of the computer is pushed behind batch files and dll extentions. 

-reply by rawr

 



#8 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 12 October 2009 - 06:02 PM

what to doBatch .bat Files

Replying to brandon10092I copy and pasted@echo off:AClsEcho MESSENGERSet /p and=User:Set /p m=Message:Net send %and% %m%PauseGoto AThat into notepad saved it as ms.Bat and opened it again ti comes up withMESSENGERUSER:MESSAGE:What do I type after that

-reply by zero-coo

 



#9 Zahra

    Newbie

  • Kontributors
  • Pip
  • 1 posts

Posted 12 November 2009 - 07:51 PM

Hi
I am trying to use a batch file for inputting variables into a program and it works for the variables which are input before running the code, but not after. Here's how I approach it:
1- make a batch file containing this line:
code.exe < input.txt
2- enter variables in the input.txt, e.g:
yes
2
input.in
1

output.out
3- run the batch file. It reads the input variables and runs the code, but after finishing the code, doesn't write the results into output.out

Any idea?
Thanks

#10 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 27 February 2010 - 05:49 AM

Batch files can do many many things, including games,messengers, folder lockers, fake viruses, to solve prob with computers

I love batch files and the bat to exe converter. 

-reply by yourface

 






Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users