High on my list is to extend the X and Alt-X commands to the directory window, so that if one of these commands is invoked when, for example, the WIDGETS directory is highlighted, the program WIDGETS.EXE is executed. But since this command doesn't exist in XTree Gold, can we perhaps fake it?
Well, it turns out that we can - almost. The trick is to write a batch file in the WIDGETS directory which contains just one line in ASCII:
WIDGETS
This file must be named X.BAT. Similarly, for e.g. WordStar, write another file also called X.BAT, containing
WS
Now to run Widgets or WordStar, just highlight the appropriate directory in the directory window and enter XX Rtn or Alt-XX Rtn. No need to change to the file window and hunt for WIDGETS.EXE or WS.EXE.
You can extend this technique to cases where the program name is not the same as the directory name, or where you normally add a command line parameter; these can be incorporated in the batch file. For instance, I run Calendar Plus with the /S parameter; accordingly, X.BAT in the CALENDAR directory contains
CCPLUS /S
This technique is also useful for DOS programs using a mouse. Since Windows loads its own mouse driver and most DOS programs do not make use of a rodent, I do not load a DOS mouse driver by default from AUTOEXEC.BAT. Instead, I include the mouse command as the first line of X.BAT in those directories requiring it.
The essence of this technique, then, is that each directory where you wish to use it must contain a file X.BAT, the content tailored to the program in that directory. You can then run that program from XTree's directory window simply by typing XX Rtn or Alt-XX Rtn; only one more keystroke than if the command were an integral part of XTree Gold.
Of course, you can do much the same thing by using XTree Gold's Application Menu, invoked by F9, where you create a menu and then write a batch file for each menu entry. I use the Application Menu for the most frequently used applications only, to save cluttering up the menu; the X.BAT technique is reserved for other programs, particularly where the directory contains a great many files making the program file difficult to locate quickly.
To recap on the difference between the X and Alt-X commands, these are both used to run, or execute, a program from within XTree Gold. X provides the program with the currently-available memory after XTree has taken its share, and if there are a great many files logged in there may not be enough memory left over to run the program. When using Alt-X, on the other hand, only a small part of XTree itself, about 7 KB, is retained in memory, the remainder being released for the program to use. When used from the file window and if a program file (.EXE, .COM or .BAT) is highlighted, that filename is pasted into the command line; no pasting occurs in the directory window.
Tom Ruben