Solved

What are batch files and scripts?

Posted on 2000-03-20
5
161 Views
Last Modified: 2013-12-28
In my mind I keep imagining that I'm an expert but I STILL can't seem to figure out just what in the world batch files and scripts are?

I'm to the thinking that I could type out the commands in Windows Notepad and then execute them by clicking on the file?  Yes/No?

How is it you run scripts or batch files?

What sort of problems do these solve? Are they the same thing?

I've always wanted to be able to open up the file info for my MP3's and have the Artist field come from the first past of a file, and the Title field to come from the second part of the file because I always name my files in a particular format (Artist Name - Title of Song.mp3) and could I use batch or script or what? (this paragraph need not be answered to receive points but would be appreciated.)

Points awarded to whoever can provide the BEST answer with "novice" step by step instructions.
0
Comment
Question by:Kilo5
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:pjknibbs
ID: 2636453
Batch files are holdovers from the old MS-DOS days--they're basically a sequence of MS-DOS commands, and they run in a command prompt when you double-click them. Script files are a more recent addition in the Windows world (full scripting languages have been standard on Unix for decades)--they're considerably more powerful than batch files, but thus require more effort to write and understand.

Both batch files and script files can be created in any text editor--Notepad will do fine--but you need to save them with a different extension: BAT for batch files, VBS for script files using the VBScript language, and JS for script files using the JScript language.

In order to do what you want with your MP3 files you'd need reasonable string handling functions, which immediately rules out batch files. If you have any experience with VBScript (from doing Web pages or whatever) or just Visual BASIC in general, have a look at the sample script files installed in \WINDOWS\SAMPLES\WSH to see how they work.
0
 

Author Comment

by:Kilo5
ID: 2638404
Can you give me any web pages or Microsoft Knowledge Database addresses in which I can learn how to make them do whatever.  I'll need some pretty newbie instructions.  I don't know ANY commands.  I'm only in my first few weeks of COBOL here at college, and I know HTML if that helps.

I suppose technically though if you know of anyplace that just has some really good example files or something, maybe I could glean something from those.  Also do you know of a place to get Visual Basic for free?
0
 
LVL 12

Accepted Solution

by:
pjknibbs earned 50 total points
ID: 2639214
Visual BASIC is a commercial application and is therefore not legally available for free. There is a learning edition available with some VB books, but it will only run programs within the IDE--you can't make redistributable programs with it.

As for example files, like I said, there should be some in the \WINDOWS\SAMPLES\WSH folder. I'm afraid I don't know of any Web resources that would help.
0
 

Author Comment

by:Kilo5
ID: 2643025
what exactly do those "example" files do?
0
 
LVL 12

Expert Comment

by:pjknibbs
ID: 2643635
They're commented internally and also display a helpful message when you run them to say what they do.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question