I'm trying a script to get the last modified date on a virtual PC running MS DOS 6.22. But whenever I find a solution which includes a loop, it shows syntax error in the console. Here's one of the lines that shows this :
for /d %%a in ("C:\log") do echo Modified date: %%~ta
Is dos 6.22 incompatible with the loops ? I have a lot of restrictions with this version (can't use robocopy, date, etc...)
The loop syntax is supported, but a bit limited (see also
for /?).So there are no switches at all.
As I remember in the most cases it wasn't possible to catch data with DOS.
It was really hard stuff even to split a simple string.
But if you absolutly need it (or have fun with it) you can split a string with a
FORloop into the first character and the rest byBut to save the first character is a bit tricky...
Or you could use
edlinordebugto parse strings.Advanced stuff like request the last modified date of a file was behind the possibilities of ms-dos.
But why you don't try it from your host computer to access the inner file system of the VM?
Then you could also use all modern technologies like cmd.exe batch