Computing.Net > Forums > Windows 95/98 > Windows 98 batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Windows 98 batch file

Reply to Message Icon

Name: ajlessard
Date: September 13, 2006 at 10:00:16 Pacific
OS: Windows '98
CPU/Ram: Pentium III 98MB
Product: IBM
Comment:

Hi...

I need to use FIND on a file to pull out all lines that contains today's date, but I cannot figure out in Win '98 how to capture the date in an environment variable and trim it to a format that I can use with FIND. I had this script running in Win2K, but the string manipulation stuff is very different and won't work in '98. Any pointers would be very helpful...

Arthur




Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: September 13, 2006 at 11:11:40 Pacific
Reply:

This will work in some 9x, depending on language, region, date layout and a few other things:

::== D9.bat
@echo off

echo.|date>datevar.bat
echo.|time>timevar.bat

echo set DATEvar=%%4>current.bat
call datevar

echo set DAYvar=%%3>current.bat
call datevar

echo set TIMEvar=%%3>current.bat
call timevar
:: DONE


=====================================
If at first you don't succeed, you're about average.

M2



0
Reply to Message Icon

Related Posts

See More


cant browse Move Win98 from PC to not...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 95/98 Forum Home


Sponsored links

Ads by Google


Results for: Windows 98 batch file

Windows 98 batch program www.computing.net/answers/windows-95/windows-98-batch-program/27803.html

Win95/98 batch file shutdown www.computing.net/answers/windows-95/win9598-batch-file-shutdown/14124.html

Windows 98 SE File Share Port www.computing.net/answers/windows-95/windows-98-se-file-share-port/137730.html