[Simh] Possible TIME and DATE Environment Variable Improvements

Christian Gauger-Cosgrove captainkirk359 at gmail.com
Wed Jan 8 15:10:05 EST 2014


I don't do much simulator scripting, but I have found one slight
inconvenience with regards to the %DATE% and %TIME% variables.

I'm trying to setup my simulator command file to attach a text file to
the simulators LPT that is dated and timed, so I don't accidentally
wipe out previous LPT listings (or make them grow to very large
sizes). As they are at present, the %DATE% and %TIME% (and the
%CTIME%, but that can be left alone) variable are really not suited
for direct use as a part of creating a file name.

Would it be possible to reformat the %DATE% variable to be ISO 8601
compliant? That is, change the forward slashes to hyphens. Secondly,
would it be possible to make the %TIME% variable either return the
time without the colons? (ISO 8601 "basic" format, as opposed to the
current ISO 8601 "extended" format.)


Alternatively, if there is some way to "massage" a the text strings
reported by %DATE% and %TIME% to be something usable for a filename in
the simulator command language I would not mind that either.


As to what I'm trying to do:
ATTACH LPT listing_%DATE%_%TIME%.txt
Though, as mentioned previously, the current return strings for %DATE%
and %TIME% will make -- at least Windows -- complain.

Thank you,
Christian

-- 
Christian M. Gauger-Cosgrove
STCKON08DS0
Contact information available upon request.


More information about the Simh mailing list