I'm experience two of the following issues in a DOS application i am running under windows 2000 server.
I have a DOS application that calls other batch scripts through it's menu system, when running a batch file I'm having problems with some commands.
When trying to do an "IF EXIST C:\DIRECTORY\nul echo directory exists"
it does not work for me, if I do the same command on a file in the directory it works fine. If i run the same command in a cmd shell it works fine as well, I don't why it is different under the enivronment for this dos program.
Also something else wierd that started happening is that the swith /Y (copy source destination /Y) no longer works for the copy command under the same situation described above. This command works fine if I enter it in a cmd shell but when executed in the script called by the dos application it gives an "invalid switch error"
These errors seem to have just started happening, they were not happening a week ago and I don't ever recall running into them before in the same environment/application i'm runing now. What could have changed to cause this wierd behavior. Something to do with the DOS version, syntax...?
If I do a ver command I get the following information.
from cmd shell: Microsoft Windows 2000 [Version 5.00.2195]
From dos app environment: MS-DOS Version 5.00.500
The ComSpec is set to cmd.exe, if I do a ver command within the script it shows the dos app using ComSpec command.com
Any help on this would be greatly appreciated. This has me so confused.