Search found 4 matches

by dcrossmier
02 May 2012 21:10
Forum: DOS Batch Forum
Topic: Unique batch file leading zeros
Replies: 10
Views: 12037

Re: Unique batch file leading zeros

Squashman wrote:Could we see the output of the DATE variable from the CMD shell?

Code: Select all

echo %date%


I think you are asking my what I see on my computer when I echo the date. This is what I see.

Code: Select all

C:\test>echo %date%
Wed 05-02-2012
by dcrossmier
02 May 2012 21:08
Forum: DOS Batch Forum
Topic: Unique batch file leading zeros
Replies: 10
Views: 12037

Re: Unique batch file leading zeros

foxidrive wrote:This will get you the date with leading zeros that you can parse too.

Code: Select all

WMIC OS Get LocalDateTime|findstr \.


Very nice, never heard of that! But how do I get the output into a DOS variable in my batch file?
by dcrossmier
02 May 2012 21:02
Forum: DOS Batch Forum
Topic: Unique batch file leading zeros
Replies: 10
Views: 12037

Re: Unique batch file leading zeros

Squashman wrote:Could we see the output of the DATE variable from the CMD shell?

Code: Select all

echo %date%


The batch file commands for unique were on this page of DosTips.com
http://www.dostips.com/DtTipsDateTime.php#
by dcrossmier
01 May 2012 23:43
Forum: DOS Batch Forum
Topic: Unique batch file leading zeros
Replies: 10
Views: 12037

Unique batch file leading zeros

I am trying to use the unique batch file but am not getting the leading zeros as expected on the month and day. I have copied the batch script verbatim without modification but at this date/time: 2012-05-02 01:17AM; Unique.bat output was: 20125201173406 I believe I am parsing it correctly, using spa...