Solved

What are batch files and scripts?

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

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Question has a verified solution.

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

Suggested Solutions

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

910 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

20 Experts available now in Live!

Get 1:1 Help Now