There is an incompatibility issue with the "File Selection" dialogs of one of our legacy MS-DOS programs. We don't have the source code of the program.
After analysis I found this is because the output of the "dir" command is dumped in a temporary text file and parsed by the program in a fragile way. The Dir command show file dates in style 2-10-98 intead of 02-10-98 like in MS-DOS. I think this is what makes the program to crash.
Is it possible to change this with a setting somewhere in 4DOS.ini, config.txt or autoexec.txt ?
Regards
Denis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you know the temporary file name, you could do a DIR to that, edit the file and make it read-only. If that works, and the file listing is static, that could be the trick.
Jos
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Clever trick! It works.
The same dump-file is used for two different input filetypes. I can combine both dir lists together, but I have to be very carefull not selecting a file from the other filetype. This even allow me to easily try different layout variants. In fact I was wrong about exact nature of the layout problem: It was not due to the date style but to the position of the filename extension. The extension has to be writen at fixed column positions (cols number 10-11-12). For instance 4DOS also has a switch (justify names) specifically designed for this:
DIR /j
The logical question is, can I configure the system to always use this switch by default? It doesn't obey to the classic "Set DIRCMD=/j" and I can't figure out how to do it in 4DOS.ini or elsewhere.
Thanks, Denis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found how to set permanently the switch in autoexec.bat. It was in the doc:
alias dir=*dir /j
So I can remove the read-only protection of the file and it works dynamically.
Denis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is an incompatibility issue with the "File Selection" dialogs of one of our legacy MS-DOS programs. We don't have the source code of the program.
After analysis I found this is because the output of the "dir" command is dumped in a temporary text file and parsed by the program in a fragile way. The Dir command show file dates in style 2-10-98 intead of 02-10-98 like in MS-DOS. I think this is what makes the program to crash.
Is it possible to change this with a setting somewhere in 4DOS.ini, config.txt or autoexec.txt ?
Regards
Denis
Like you, I didn’t find such an option.
If you know the temporary file name, you could do a DIR to that, edit the file and make it read-only. If that works, and the file listing is static, that could be the trick.
Jos
Clever trick! It works.
The same dump-file is used for two different input filetypes. I can combine both dir lists together, but I have to be very carefull not selecting a file from the other filetype. This even allow me to easily try different layout variants. In fact I was wrong about exact nature of the layout problem: It was not due to the date style but to the position of the filename extension. The extension has to be writen at fixed column positions (cols number 10-11-12). For instance 4DOS also has a switch (justify names) specifically designed for this:
DIR /j
The logical question is, can I configure the system to always use this switch by default? It doesn't obey to the classic "Set DIRCMD=/j" and I can't figure out how to do it in 4DOS.ini or elsewhere.
Thanks, Denis
I found how to set permanently the switch in autoexec.bat. It was in the doc:
alias dir=*dir /j
So I can remove the read-only protection of the file and it works dynamically.
Denis