Link to home
Start Free TrialLog in
Avatar of Kilo5
Kilo5

asked on

What are batch files and scripts?

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.
Avatar of pjknibbs
pjknibbs

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.
Avatar of Kilo5

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of pjknibbs
pjknibbs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kilo5

ASKER

what exactly do those "example" files do?
They're commented internally and also display a helpful message when you run them to say what they do.