answersLogoWhite

0


Best Answer

Scripts are distinct from the core code of the application, which is usually written in a different language, and are often created or at least modified by the end-user. The program has an executable form that the computer can use directly to execute the instructions.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

A batch file is just an alternate name for a command script. The only real difference is that batch files have a .BAT extension while command scripts have a .CMD extension. Command scripts simply contain a series of commands that are executed one after the other just as if you'd entered them at the command prompt, but with additional features such as decisions, jump statements and simple loops. They are typically used to automate simple command-based tasks.

Scripts achieve pretty much the same thing, but they have a much richer language with many built-in functions and authors can also create user-defined functions to provide additional functionality. Thus they are not limited to merely executing commands like a command script. However, unlike programming languages, scripts are interpreted rather than compiled.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between a batch file and a script?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How does batch file work?

batch files are used to make long tasks shorter. for example, If I wanted to change the file extension of every file in the folder EXAMPLEFOLDER from .txt to .doc, I could make a batch file that did that instantly, rather than going into the properties of every file and changing the extension manually


How can you mask your password when typing in a batch file?

Natively, you can't replace characters typed into a batch file from the keyboard with asterisks or any other character to mask what is being typed. You will have to download a special program and run that alongside CMD.exe in order to have this functionality.


How do you send commands to a command-line EXE program from a batch?

Just put the commands in your batch file. When someone runs the program, it will execute the commands it comes across line-by-line. - Example Batch Script: This script will run an application EXE file with command line parameters. This will use the shutdown.exe file that comes with windows. It shuts down the computer in 60 seconds. @shutdown -s -t 60 - You could also use the START command. For any command or exe file that runs from the command line, you could open a command prompt and type the name of the file followed by /? to find out what you can use as command parameters. Example: START /?


How do you name a batch program?

Assuming you mean a shell script (AKA batch file), you simply add a .bat as the extension to any plaintext file. There is no limitation for the actual filename aside from this (except for regularly unallowed charachters like > and /). For instance, if you wanted to name your batch file hello world, you would open up a new notepad document, enter your code, then save as File Name: hello world.bat and change the Save as Type: All Files. Windows automatically recognizes any file with the .bat extension as an executable batch file, so to run it, you would just double-click it like any other document or file. To edit the batch file again, you can right click it and select Edit, or use notepad to open it from its respective location. Hope that answers your question.


How do you edit your registry from a batch file?

You can only do it with regetit.exe, and plus if you are asking to change it with a batch file ... trying to make a virus?

Related questions

What do you call a little program made from batch file?

A Batch Script


What is scripting in Linux?

"Shell Script is series of command written in plain text file. Shell script is just like batch file in MS-DOS but have more power than the MS-DOS batch file."


What is the bat file extension called?

.bat indicates a batch file, which is a script. You can see what it contains by opening it with a text editor, such as notepad.


What is the full form of BAT?

if by bat you made the .bat file extension then the full form of bat is batch. it is a file that is created with batch script, the windows command line.


What is the extension of batch file?

the extension of a batch file is ".bat"


Difference between encoding and batch encoding?

Encoding simply refers to the "encoding" of one single file. Batch encoding refers to setting up several files to encode one after another. It's basically automated.


How does batch file work?

batch files are used to make long tasks shorter. for example, If I wanted to change the file extension of every file in the folder EXAMPLEFOLDER from .txt to .doc, I could make a batch file that did that instantly, rather than going into the properties of every file and changing the extension manually


How can you mask your password when typing in a batch file?

Natively, you can't replace characters typed into a batch file from the keyboard with asterisks or any other character to mask what is being typed. You will have to download a special program and run that alongside CMD.exe in order to have this functionality.


How do you make a batch file that copies files into a usb?

You do this: @echo off title You are hacked by a script kiddie copy "Location to copy files into here" "Location of the USB drive and what the file's names are" exit


Can a file with a weird extension but with batch file code be read using another batch file?

Nope, the format of a file is a vital part of a successful batch file. Even if a file with an unknown file format contains working batch file code in it, a batch file will still not be able to read it because of its foreign file extension. If you want the batch file to be able to read the foreign file, then you can set it to rename the mutated file to .bat format and then read it for it to work. Example: @Echo off REN File.Foreign File.bat CALL File.bat exit


What is a batch file?

A batch file is the text file that contains a series of commands that MS-DOS carries out. A batch file is created by COPY CON command after specifying a file name by using extension as .BAT in DOS mode.


How is a file extension formed?

File extensions are simply part of the file name. Your operating system will often use the extension part of the file name (after the dot) to determine which program to open the file with. You could make a simple batch script by opening a .txt file, adding the scripting stuff into it and saving it as a .bat file. Your operating system will then treat it as a script you can run rather than opening it directly in a text editor.