Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The moon is made of green cheese. -- John Heywood


devel / alt.msdos.batch / Win98 DOS name a file with the date.

SubjectAuthor
* Win98 DOS name a file with the date.Homer Wilson Smith
+- Re: Win98 DOS name a file with the date.Robert Roland
+- Re: Win98 DOS name a file with the date.Auric__
+* Re: Win98 DOS name a file with the date.JJ
|`* Re: Win98 DOS name a file with the date.Klaus Meinhard
| `- Re: Win98 DOS name a file with the date.Klaus Meinhard
`- Re: Win98 DOS name a file with the date.Herbert Kleebauer

1
Win98 DOS name a file with the date.

<thlth2$kpd$1@adore.lightlink.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=240&group=alt.msdos.batch#240

  copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!adore2!not-for-mail
From: hom...@adore.lightlink.com (Homer Wilson Smith)
Newsgroups: alt.msdos.batch
Subject: Win98 DOS name a file with the date.
Date: Thu, 6 Oct 2022 02:44:50 -0400 (EDT)
Organization: I SPEAK ONLY FOR MYSELF
Lines: 15
Message-ID: <thlth2$kpd$1@adore.lightlink.com>
NNTP-Posting-Host: news.lightlink.com
X-Trace: adore.lightlink.com 1665038690 21293 64.57.176.10 (6 Oct 2022 06:44:50 GMT)
X-Complaints-To: homerwsmith@lightlink.com
NNTP-Posting-Date: Thu, 6 Oct 2022 06:44:50 +0000 (UTC)
User-Agent: tin/2.1.1-20120623 ("Mulindry") (UNIX) (Linux/2.6.18-419.el5 (i686))
 by: Homer Wilson Smith - Thu, 6 Oct 2022 06:44 UTC

Running Win98 4.10.2222 DOS 5.x or 6.x batch scripts

Need to write a file or directory with the date.

echo %date% does not work as it does in future windows.

Is there a batch script command that will do this for me?

Thanks Homer W Smith (Lightlink CEO.)

--
------------------------------------------------------------------------
Homer Wilson Smith Clean Air, Clear Water, Art Matrix - Lightlink
(607) 277-0959 A Green Earth, and Peace, Internet, Ithaca NY
homer@lightlink.com Is that too much to ask? http://www.lightlink.com

Re: Win98 DOS name a file with the date.

<m8itjhdp19fe0oi9e2879r72d20sgbb4lj@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=241&group=alt.msdos.batch#241

  copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: fak...@ddress.no (Robert Roland)
Newsgroups: alt.msdos.batch
Subject: Re: Win98 DOS name a file with the date.
Date: Thu, 06 Oct 2022 14:27:48 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <m8itjhdp19fe0oi9e2879r72d20sgbb4lj@4ax.com>
References: <thlth2$kpd$1@adore.lightlink.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="75b744363c08823ef9b65e48bcc13a75";
logging-data="3540587"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+S/ZJ/W2w4Qbw7CLzs0N5/"
Cancel-Lock: sha1:HqIqhGRPB1dAOd1AYdpvLYzJGq4=
X-Newsreader: Forte Agent 4.2/32.1117
 by: Robert Roland - Thu, 6 Oct 2022 12:27 UTC

On Thu, 6 Oct 2022 02:44:50 -0400 (EDT), Homer Wilson Smith
<homer@adore.lightlink.com> wrote:

> Running Win98 4.10.2222 DOS 5.x or 6.x batch scripts
>
> Need to write a file or directory with the date.
>
> echo %date% does not work as it does in future windows.
>
> Is there a batch script command that will do this for me?

If I remember correctly, Win98 did come with VBscript. It only works
in Windows mode, though.

Could that be an option?
--
RoRo

Re: Win98 DOS name a file with the date.

<XnsAF2871E147E4Eauricauricauricauric@88.198.57.247>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=242&group=alt.msdos.batch#242

  copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: not.my.r...@email.address (Auric__)
Newsgroups: alt.msdos.batch
Subject: Re: Win98 DOS name a file with the date.
Date: Thu, 6 Oct 2022 18:11:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <XnsAF2871E147E4Eauricauricauricauric@88.198.57.247>
References: <thlth2$kpd$1@adore.lightlink.com>
Injection-Date: Thu, 6 Oct 2022 18:11:39 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="b24449186d0c738ccca5c4c028f7ab5a";
logging-data="3574119"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rVHhLq+Y4obTXfgLzkXIB"
User-Agent: Xnews/2009.05.01
Cancel-Lock: sha1:bZnUnb6ahOebnS5loWLsoTW7lWM=
X-Face: +,&^!i3LPqz7/qfxgF[JJqAP^>bTVLZ-zj})PmI{auZ']fwMM4mh`$]b0sacD4p@R[yU'Mf=.T}|aW6^#_lm6U|e|/#d:nfRn29,GBLvX=ygRH(?h.=KFfJ\INamt#H|)k@,x[ko$(d~iAo'<1XzB@%];
 by: Auric__ - Thu, 6 Oct 2022 18:11 UTC

Homer Wilson Smith wrote:

> Running Win98 4.10.2222 DOS 5.x or 6.x batch scripts
>
> Need to write a file or directory with the date.
>
> echo %date% does not work as it does in future windows.
>
> Is there a batch script command that will do this for me?

If it needs to be DOS-compatible, QBasic is an option. (Robert's suggestion
of VBscript won't work under DOS.) Save this to a file called something like
"MDDATE.BAS":

'---begin---
'create directory using today's date as the name
ON ERROR GOTO ender
x$ = DATE$
'y$ is the created directory name in YYYYMMDD format
' year month day
y$ = RIGHT$(x$, 4) + LEFT$(x$, 2) + MID$(x$, 4, 2)
MKDIR y$
ender:
SYSTEM
'---end---

....and save this to something like "MFDATE.BAS":

'---begin---
'create file using today's date as the name
ON ERROR GOTO ender
RANDOMIZE TIMER
x$ = DATE$
'y$ is the created file name in YYYYMMDD format
'change ".txt" to whatever you want
' year month day
y$ = RIGHT$(x$, 4) + LEFT$(x$, 2) + MID$(x$, 4, 2) + ".txt"
z$ = LTRIM$(STR$(INT(RND * 100000000)))
'this nonsense needed because qbasic lacks functionality
SHELL "dir /b " + y$ + ">" + z$ + ".tmp"
OPEN z$ + ".tmp" FOR INPUT AS 1
IF LOF(1) < 1 THEN
'file does not exist; create
OPEN y$ FOR BINARY AS 2
END IF

ender:
ON ERROR GOTO ender2
CLOSE
KILL z$ + ".tmp"
ender2:
SYSTEM
'---end---

Then call the appropriate script at the point in your batch that you need to
create your file:

QBASIC /RUN MFDATE.BAS

....or directory:

QBASIC /RUN MDDATE.BAS

--
When life shuts a door, open it back up.
That's how doors work.
Then shut it again.

Re: Win98 DOS name a file with the date.

<ocyclfl3imrx.9prkstzlccnl.dlg@40tude.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=243&group=alt.msdos.batch#243

  copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jj4pub...@outlook.com (JJ)
Newsgroups: alt.msdos.batch
Subject: Re: Win98 DOS name a file with the date.
Date: Fri, 7 Oct 2022 05:19:59 +0700
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <ocyclfl3imrx.9prkstzlccnl.dlg@40tude.net>
References: <thlth2$kpd$1@adore.lightlink.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="2c83b45ea71282cf9f515c3a9841156c";
logging-data="3655826"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/X2Srksav93G587JcJRUzXIS7bONqjQk="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:8nldeo0t3dvlvxaImD4P/SuYjYg=
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
 by: JJ - Thu, 6 Oct 2022 22:19 UTC

On Thu, 6 Oct 2022 02:44:50 -0400 (EDT), Homer Wilson Smith wrote:
> Running Win98 4.10.2222 DOS 5.x or 6.x batch scripts
>
> Need to write a file or directory with the date.
>
> echo %date% does not work as it does in future windows.
>
> Is there a batch script command that will do this for me?
>
> Thanks Homer W Smith (Lightlink CEO.)

The %DATE% variable is an internal variable which is provided by CMD.EXE.
CMD.EXE does not exist in Windows 9x/ME. It only exist in NT based Windows,
and it can't run under Windows 9x/ME.

For Windows 9x/ME, without downloading additional software, the alternative
method is to use Windows Script Host (WSH) with either VBScript or JScript.

With additional software download, my recommendation is to use the open
source 4DOS (formerly a JPSoft's proprietary software). 4DOS is a
replacement for COMMAND.COM and has CMD capabilities (and more). It's 99%
compatible with CMD.EXE and COMMAND.COM.

https://www.4dos.info/

Re: Win98 DOS name a file with the date.

<thok8f$3kcq3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=244&group=alt.msdos.batch#244

  copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: k_meinh...@gmx.de (Klaus Meinhard)
Newsgroups: alt.msdos.batch
Subject: Re: Win98 DOS name a file with the date.
Date: Fri, 7 Oct 2022 09:25:02 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <thok8f$3kcq3$1@dont-email.me>
References: <thlth2$kpd$1@adore.lightlink.com>
<ocyclfl3imrx.9prkstzlccnl.dlg@40tude.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 7 Oct 2022 07:25:03 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="89703ec615855b5608c98e6be3dde825";
logging-data="3814211"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qgTiiAaetOmNMh2SyPWqf"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.1
Cancel-Lock: sha1:xF8WFPyQGhOuFYn4jGv89AyNLCM=
In-Reply-To: <ocyclfl3imrx.9prkstzlccnl.dlg@40tude.net>
Content-Language: de-DE
 by: Klaus Meinhard - Fri, 7 Oct 2022 07:25 UTC

Am 07.10.2022 um 00:19 schrieb JJ:

> With additional software download, my recommendation is to use the open
> source 4DOS (formerly a JPSoft's proprietary software). 4DOS is a
> replacement for COMMAND.COM and has CMD capabilities (and more). It's 99%
> compatible with CMD.EXE and COMMAND.COM.
>
> https://www.4dos.info/

... which has the TOUCH command to change file and directory timestamps.

--
Mit freundlichen Grüßen,

* Klaus Meinhard *

Re: Win98 DOS name a file with the date.

<thoku4$3kcq2$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=245&group=alt.msdos.batch#245

  copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: k_meinh...@gmx.de (Klaus Meinhard)
Newsgroups: alt.msdos.batch
Subject: Re: Win98 DOS name a file with the date.
Date: Fri, 7 Oct 2022 09:36:35 +0200
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <thoku4$3kcq2$1@dont-email.me>
References: <thlth2$kpd$1@adore.lightlink.com>
<ocyclfl3imrx.9prkstzlccnl.dlg@40tude.net> <thok8f$3kcq3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 7 Oct 2022 07:36:36 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="89703ec615855b5608c98e6be3dde825";
logging-data="3814210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uBLrF3jStxsqubMCOd0FO"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.1
Cancel-Lock: sha1:XuutpJdXBUJa9gEAdDICKLsww9k=
Content-Language: de-DE
In-Reply-To: <thok8f$3kcq3$1@dont-email.me>
 by: Klaus Meinhard - Fri, 7 Oct 2022 07:36 UTC

Am 07.10.2022 um 09:25 schrieb Klaus Meinhard:

... and it might be funny to compare my (mostly) 1-line 4DOS solutions
to Timo's Batfaq list today:

<https://www.4dos.info/4batfaq.htm>

Even today, JP Software's Take Command, the successor to 4NT and 4DOS,
is way ahead of Microsofts CMD and Powershell. There's a free version
called TCC/LE on theit website.
--
Mit freundlichen Grüßen,

* Klaus Meinhard *

Re: Win98 DOS name a file with the date.

<thuaqi$1lch$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=246&group=alt.msdos.batch#246

  copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!zoP+VR4T6O1NF9PK7D+mIQ.user.46.165.242.91.POSTED!not-for-mail
From: kle...@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.msdos.batch
Subject: Re: Win98 DOS name a file with the date.
Date: Sun, 9 Oct 2022 13:20:50 +0200
Organization: Aioe.org NNTP Server
Message-ID: <thuaqi$1lch$1@gioia.aioe.org>
References: <thlth2$kpd$1@adore.lightlink.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="54673"; posting-host="zoP+VR4T6O1NF9PK7D+mIQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: de-DE, en-US
 by: Herbert Kleebauer - Sun, 9 Oct 2022 11:20 UTC

On 06.10.2022 08:44, Homer Wilson Smith wrote:
> Running Win98 4.10.2222 DOS 5.x or 6.x batch scripts
>
> Need to write a file or directory with the date.
>
> echo %date% does not work as it does in future windows.
>
> Is there a batch script command that will do this for me?
>
> Thanks Homer W Smith (Lightlink CEO.)
>

:::::::::::::::::::::::::::::::::::::::::::::
echo set date=%%2 >call._1_
dir call._1_ |find "_1_" >_2_.bat
ren call._1_ _1_.bat
call _2_.bat
del _1_.bat
del _2_.bat
echo %date%
:::::::::::::::::::::::::::::::::::::::::::::

In NT+ this works only if you use the /-n in the dir command:
dir /-n call._1_ |find "_1_" >_2_.bat

Or a more flexible version (works only in DOS or 32 bit Windows):

@echo off
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>d_t.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>d_t.com
echo LisqMz`wGH@wKuur`G@w?ogBgGG}G?j_egoNOG?w?`gBLksqgG`w?WgBgG>>d_t.com
echo G}G?R_MgoNMy?wSx@W?s?W?@zAB`LrFuBLyt~vuco{@LuKooD?BFHqrIcP>>d_t.com
echo _sdDxb1T??=?rILO_sdDqx1T??=?rILO_sdDnl1T??=?rILO_sdD`c1T??>>d_t.com
echo =?rILO_sdDgg1T??=?rILO_sdDll1T??=?rILO_sdDrr1T??=??IL?0xxx>>d_t.com

d_t.com>d_t.bat
call d_t.bat
del d_t.com
del d_t.bat

echo century: %_cy%
echo year: %_yr%
echo month: %_mo%
echo day: %_da%
echo hour: %_hh%
echo minute: %_mm%
echo second: %_ss%

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor