Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!newscon04.news.prodigy.net!prodigy.net!newsdst01.news.prodigy.net!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.net.POSTED!eadf9591!not-for-mail
From: 0@0.0 (FileGod)
Newsgroups: alt.msdos.batch.nt,fidonet.batpower
Subject: RenDateTime.bat
Lines: 29
Message-ID:
NNTP-Posting-Host: 71.142.58.231
18 Mar 2008 04:05:38 EDT)
NNTP-Posting-Date: Tue, 18 Mar 2008 04:05:38 EDT
Organization: SBC http://yahoo.sbc.com
Date: Tue, 18 Mar 2008 08:05:38 GMT
Bytes: 2443
Xref: number1.nntp.dca.giganews.com alt.msdos.batch.nt:42520
fidonet.batpower:587
In alt.msdos.batch (suzy from paris) was looking to rename file based on
the date & time & I wanted a batch file about the same before, I did get
this working today & got the often found bug fixed to get the colon out
using code that foxidrive posted, I have not test it much or got fancy using
FOR or anything, this is a basic start on on something that can become worth
saving I guess since I never did find a date & time file rename batch file,
the reason folks had problems with trying to create a batch file like this
is a colon in the resulting file name, I think even Linux would have a
problem with a file call a file named something like some:new.txt since some
would be considered as a drive. I wrote this on a XP but it might work with
something like DOS 6.22, this should work with Win 9x I guess, for now it is
just another batch file to add to my battery of batch files for future use,
I am shocked I never did find one like this before.
One thing I can not explain is where that extra t in the file name comes
from, I will it over again...
dir>Test.txt
set Now=|date|find "/"
set GetDateTime=%date%-%time%
echo %GetDateTime%
rem The line below is to get the colon out of the file name.
set "Now=%GetDateTime::=%"
REN Test.txt "%Now:/=%*.txt"
Has anyone ever wrote a DIR2HTML.bat before?, I did not find one so I am
thinking about doing one...
http://www.filegod.netfirms.com
|