vbscript vs dos

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sxekjb
Posts: 16
Joined: 07 Nov 2009 19:13

vbscript vs dos

#1 Post by sxekjb » 08 Jan 2010 13:54

I know this is discussed in a multipage thread argument, but can someone give me the pros and cons of both and include a scenario. In other words what makes vbscript more powerful than using a dos batch.

ENU_USER*.*
Posts: 5
Joined: 10 Jan 2010 14:57
Location: U.S FL.

#2 Post by ENU_USER*.* » 10 Jan 2010 15:08

I use both , .vbs seems to execute a lot faster only drawback with
using vbs than I have experienced is that some of my viurs and spyware apps give a false-postive alert (MS Essentials etc.) if i leave the vbs script on my harddrive so i usually just auto-delete it when done... 8)

sxekjb
Posts: 16
Joined: 07 Nov 2009 19:13

#3 Post by sxekjb » 11 Jan 2010 14:09

Thanks for your response. As far as I can see I can do everything vbscript can do with command prompt. If anyone has any examples to give as to why some scripts are preferred to be written in vbscript I'd like to see it.

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

#4 Post by avery_larry » 11 Jan 2010 16:41

Well -- vbscript is an actual scripting language. I think very few people indeed would venture to call DOS a scripting language -- though obviously you can do some scripting.

alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

#5 Post by alan_b » 16 Jan 2010 04:49

Example where DOS cannot work :-

I needed to know the time interval between the modifications of several files.
The DOS command DIR gave me date and hours and minutes, but no seconds.
I had to use VB script to get the time resolved down to 1 second.

N.B. If I only need a time resolution down to 1 minute,
then DOS DIR will give an instant answer,
whilst VBscript takes a couple of seconds to launch.

Alan

Post Reply