Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Display time including seconds in MS DOS (Read 39375 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Display time including seconds in MS DOS
03.02.07 at 09:49:16
 
Display time including seconds in MS DOS
 
I wanted to test a network connection by copying some large files. It would be handy to make a batch file that displays the time in seconds between copying each file so I can compute the time it took to copy a file. I used this command to display the current time in MSDOS:
 
echo. | time | find "Current"
 
My full test file is:
Code:
echo. | time | find "Huidige"
dir email.tib
copy email.tib f:
echo. | time | find "Huidige"
dir email1.tib
copy email1.tib f:
echo. | time | find "Huidige"
dir email2.tib
copy email2.tib f:
echo. | time | find "Huidige"
 


 
Note I am using a Dutch PC (Windows XP Home) so Current is translated to Huidige.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
jlous
YaBB Newbies
*


I Love SQL*XL

Posts: 0
Re: Display time including seconds in MS DOS
Reply #1 - 13.12.07 at 10:51:56
 
Nice trick! Just what I needed.
My only little improvement:
search for "," in stead of "current" or whatever, and it becomes
language independent.
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Display time including seconds in MS DOS
Reply #2 - 13.12.07 at 17:54:48
 
Yes, that works great.  
 
I used:
Code:
C:\>echo. | time | find ","
The current time is: 17:53:14,51
 


 
Thanks for your comment!
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
ronaldmaas
YaBB Newbies
*


I Love SQL*XL

Posts: 0
Re: Display time including seconds in MS DOS
Reply #3 - 22.08.08 at 17:04:06
 
Nice trick.
 
Unfortunately doesn't work on my setup. The time returned doesn't contain a comma, it contains a full stop.
The seperator used IS language dependent.
 
echo. | time
The current time is: 16:02:31.14
Enter the new time:
 
 
 
Regards,
 
Ronald
 
Back to top
 
 
Email   IP Logged
jlous
YaBB Newbies
*


I Love SQL*XL

Posts: 0
Re: Display time including seconds in MS DOS
Reply #4 - 22.08.08 at 17:11:17
 
Dammit.  The second line even has a space after the colon, so you can't use that either.
I'm all out of ideas, then.
Back to top
 
 
  IP Logged
uniphase
YaBB Newbies
*


I Love SQL*XL

Posts: 0
Re: Display time including seconds in MS DOS
Reply #5 - 06.11.08 at 14:29:38
 
Hi guys,
try that
 
echo . |time|findstr [0-9]
Back to top
 
 
Email   IP Logged
maxt
YaBB Newbies
*


I Love SQL*XL

Posts: 0
Re: Display time including seconds in MS DOS
Reply #6 - 09.08.09 at 18:28:53
 
You can use 'echo %time%' instead...
 
Max
Back to top
 
 
  IP Logged
Pages: 1