Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Timing a batch file

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3194
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Timing a batch file
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Timing a batch file - 6/2/2005 5:11:06 AM   
  robszar


Posts: 182
Score: 0
Joined: 2/27/2005
From:
Status: offline
does anyone know if you can time a batch file? I am trying to time the current login script which is a batch file vs my vb login script, which I can time.
Thanks
 
 
Post #: 1
 
 Re: Timing a batch file - 6/2/2005 5:51:02 AM   
  chrmead

 

Posts: 32
Score: 0
Joined: 6/2/2005
From: USA
Status: offline
Play with ping.

ping -n 1000 localhost

It will output a new line every second. Maybe you could count the lines somehow. I never found another builtin DOS timer.

(in reply to robszar)
 
 
Post #: 2
 
 Re: Timing a batch file - 6/2/2005 5:56:09 AM   
  robszar


Posts: 182
Score: 0
Joined: 2/27/2005
From:
Status: offline
I was thinking more like
echo. |time |find "current"

script

echo. |time |find "current"

difference?

(in reply to robszar)
 
 
Post #: 3
 
 Re: Timing a batch file - 6/2/2005 6:01:31 AM   
  chrmead

 

Posts: 32
Score: 0
Joined: 6/2/2005
From: USA
Status: offline
Try this

echo %time%

(in reply to robszar)
 
 
Post #: 4
 
 Re: Timing a batch file - 6/2/2005 6:09:59 AM   
  robszar


Posts: 182
Score: 0
Joined: 2/27/2005
From:
Status: offline
I can get the current time, I just need a way to get the difference. thats the tricky part

(in reply to robszar)
 
 
Post #: 5
 
 Re: Timing a batch file - 6/2/2005 6:16:54 AM   
  chrmead

 

Posts: 32
Score: 0
Joined: 6/2/2005
From: USA
Status: offline
Oh, I see. I was thinking that you may be able to pipe the echo results to findstr, but I can't make it work. Sorry.

(in reply to robszar)
 
 
Post #: 6
 
 Re: Timing a batch file - 6/2/2005 7:14:35 AM   
  chrmead

 

Posts: 32
Score: 0
Joined: 6/2/2005
From: USA
Status: offline
Maybe this'll do:
http://www.microsoft.com/technet/scriptcenter/guide/sas_vbs.mspx

(in reply to robszar)
 
 
Post #: 7
 
 Re: Timing a batch file - 6/2/2005 7:24:05 AM   
  robszar


Posts: 182
Score: 0
Joined: 2/27/2005
From:
Status: offline
Thanks but that is with VBScript. I need this for a batch file

(in reply to robszar)
 
 
Post #: 8
 
 Re: Timing a batch file - 6/2/2005 7:32:44 AM   
  chrmead

 

Posts: 32
Score: 0
Joined: 6/2/2005
From: USA
Status: offline
Why not use a vbscript to launch your batch file?

(in reply to robszar)
 
 
Post #: 9
 
 Re: Timing a batch file - 6/2/2005 7:48:23 AM   
  robszar


Posts: 182
Score: 0
Joined: 2/27/2005
From:
Status: offline
read my 1st post. I am trying to improve the current login script but I have to show the improvment

(in reply to robszar)
 
 
Post #: 10
 
 Re: Timing a batch file - 6/2/2005 8:04:12 AM   
  chrmead

 

Posts: 32
Score: 0
Joined: 6/2/2005
From: USA
Status: offline
I think that what you need is in this guy's code. The description seems perfect.

http://www.novell.com/coolsolutions/tools/13557.html

(in reply to robszar)
 
 
Post #: 11
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Timing a batch file Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts