Solved

What are batch files and scripts?

Posted on 2000-03-20
5
154 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

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Join & Write a Comment

A few months ago I had an issue with LaserJet 1020 printer which was installed to XP and Windows 7.  It was installed to XP and working, but when I tried to connect from a Windows 7 PC, it would attempt connection and then fail.  Sometimes the Spool…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now