![]() |
Exit Operation |
IntroductionThe Exit Operation (Magic Windows) has the same behavior than the "Run" dialog box in Windows. It is different of previous DOS Magic version, where the behavior was the same than the DOS prompt. So you can call : executable files (.exe, .com, .bat) or files with registered extensions (.wri, .txt, .htm, ... - you don't need to call the application) ; but you can't call DOS internal commands (dir, mkdir, copy, ...). Dos BatchMy recommendation to call DOS commands (ie DOS internal commands and DOS applications) are :
For instance, to make a dir, you used in DOS days the dir > list.txt. Now you should use the following batch file : @echo off dir /b > list.txt @cls So the window will close automatically, the correct command interpreter will be used. The /b flag output only the file names, because the output format is different between DOS and Windows versions. ConclusionDOS calls are costly in Windows environment, especially with Windows NT. Actually, make a DOS call in Windows is a bit like launching a DOS computer. So a better solution is to use Windows functions, by using a DLL such as GET.DLL, where i have put several replacement for DOS calls (dir functions, mkdir, rmdir, deltree, cat, get_file_attributes,... and Magic provide functions like iocopy, ioexist, iodel, ioren, iosize, ...). |