Home | Gallery | Forum | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com Forum
OS2 World.Com Online Discussion Forum.
Index / OS/2 - General / Programming
author message
How the hell do you print a time and date into a txt file from a cmd file
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
Justin
Send an email to this member
1. How the hell do you print a time and date into a txt file from a cmd file
Reply to this topic with quote Modify your message
Hi I'm trying to write a batch file and can't for the life of me find a way to print the time and date into a text file from at cmd/bat file
if anyone knows how to do this in OS2 warp 4 could you please send me an email with how to do this
Date: 25 Jun, 2002 on 10:26
BigWarpGuy
Premium member
in staff

View this member's profileSearch all posts from this memberSend an email to this memberhttp://home.comcast.net/~tomleem
posts: 2298
since: 12 Jan, 2001
2. Re:How the hell do you print a time and date into a txt file from a cmd file
Reply to this topic with quote Modify your message
Perhaps this question should go into the programming section of this forum(?).
OS/2 Warp-ed to the very end.
Date: 08 Aug, 2002 on 19:38
Kim
Team member
in staff

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.haverblad.se
posts: 2128
since: 10 Dec, 2000
3. Re:How the hell do you print a time and date into a txt file from a cmd file
Reply to this topic with quote Modify your message
Correct, I've moved this from the Utility board to the Programming board.
Date: 15 Sep, 2002 on 22:52
JasonL
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this memberhttp://home.houston.rr.com/luedke
posts: 21
since: 10 Jun, 2001
4. Re:How the hell do you print a time and date into a txt file from a cmd file
Reply to this topic with quote Modify your message
try the following:

echo Úte%, %time%>foo.txt

JasonL

Date: 01 Oct, 2002 on 23:36
JasonL
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this memberhttp://home.houston.rr.com/luedke
posts: 21
since: 10 Jun, 2001
5. Re:How the hell do you print a time and date into a txt file from a cmd file
Reply to this topic with quote Modify your message
Sorry, the one time I don't preview before I post is the time it messes up.

Let's try again:

echo %date%, %time%>foo.txt

Date: 01 Oct, 2002 on 23:38
kkafetz
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 1
since: 30 Oct, 2003
6. Re:How the hell do you print a time and date into a txt file from a cmd file
Reply to this topic with quote Modify your message
Try the following:

@echo | date |find "Current" >document.txt
@echo | time |find "Current" >>document.txt

( Note: ("Current"=case sensitive) and (>, >> = create, extend file)

Date: 30 Oct, 2003 on 13:39
How the hell do you print a time and date into a txt file from a cmd file
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
All times are CET+1. < Prev. | P. 1 | Next >
Go to:
 

Powered by UltraBoard 2000 Standard Edition,
Copyright © UltraScripts.com, Inc. 1999-2000.
Home | Gallery | Forums | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com 2000-2004