File: XTree:\Tips&Tricks | |Bottom_of_page |
|i. Starting XTreeGold with batch files
|ii. Memory usage
|iii. Environment space for eXecuted programs
|iv. Determination of free disk space
|v. AutoCAD (.DWG-file) viewing problems
|vi. Meaning of signs left to directory names
|vii. Survey of tagged files
|viii. The 'B'ranch Command
|ix. The Treespec command I
|x. The Treespec command II
|xi. Printer redirection with XTreeGold 3.0x
|xii. Print "Lines per page"-value options
|xiii. The ALT-'B'atch command
|xiv. The CTRL-'B'atch command I
|xv. The CTRL-'B'atch command II
|xvi. Predefined color sets
|xvii. Application menu entries
|xviii.Partial untag
i. Starting XTreeGold with batch files
--------------------------------------In case you want to start XTree and only log to files in one particular directory, without reading all the other files or scrolling up and down the directory tree, you can use this handy batch file, which allows to almost instantly complete this task:
Create a batch file, named "XTD.BAT" or so:
CD %1
C:\XTGOLD\XTGOLD /L1When running this batch file, just enter: XTD \DIRNAME and XTree will highlight the specified directory, then you can press enter to log the files.
Note: The /L1 command line switch has been introduced with XTreeGold version 2.0 (and above) and allows you to just log to the first directory level without logging the files.
On very large hard drives it may be useful to instantly log only to a certain branch, while leaving out anything further:
Create a batch file, named "XTD.BAT" or so:
SUBST L: %1
C:\XTGOLD\XTGOLD L:
SUBST L: /DA more sophisticated version of this batch file is given here (tailored to XTreePro). To use it from the command line, enter:
XTD C:\DIRNAME
then XTree will come up with a tree that has DIRNAME as root directory.
ii. Memory usage
----------------All information of logged files and directories is stored by XTreeGold in conventional memory (i.e. the first 640KB). Therefore the total size of available conventional memory before starting XTreeGold will affect the number of directories and files that can be logged in. For each file and directory to be read, XTreeGold does use about 32 bytes of conventional memory. If the files and directories you try to log to exceed the available conventional memory, XTreeGold will report an "Error: Out of Memory" message. To avoid this, try one of this work-arounds:
1. Release previously logged files and directories information, which are held in XTreeGold's memory by highlighting the respective directory to be released and pressing the "-" sign. This will release all information from the memory about this entire branch. Also a "+" (plus) sign will be shown to the left of all the released directories.
2. Try to configure XTreeGold not to log an entire volume when invoking the log command. How to do this: Hit ALT+F10 and select "1" (Modify Configuration Items). Then, on the first page, under item "Disk Logging", change the options #5 and #6 to "Yes". After that press "M" to return to the Main Menu, then "S" for "Save Configuration and Quit", and finally "Enter" to confirm to save the options.
Note: If you want to only log to the highlighted directory, hit "Enter" or press "+". To log the entire highlighted branch (the directory and all its subdirectories), press "*". Refer to |topic vi. for more information on tree expanding and collapsing.
iii. Environment space for eXecuted programs
--------------------------------------------Whenever XTreeGold launches a program, this is done through a secondary command processor (normally this is "COMMAND.COM"). Therefore only the environment space currently in use by the primary command processor (XTreeGold) can be allocated to the secondary command processor (COMMAND.COM), and not the memory allocated by the CONFIG.SYS file Shell= statement. Now you have two options to increase the environment space for external programs called by XTreeGold:
I. Set a dummy environment variable prior to running XTreeGold:
1. Before starting XTreeGold, type:
SET DUMMY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2. To run the application create a batch file, that contains what follows as its first line:
SET DUMMY=
3. Now run this batch file from within XTreeGold.
This will allocate as much bytes of environment space, as the number of "X"-characters entered in the first SET DUMMY= statement.
II. Use a batch file that directly increases the secondary command processor environment to run your program.
In the example given here, "XXX" (in bytes) is the amount of desired environment, and "/Cprogram" is the command to start the program (note not to put a space after "/C").COMMAND.COM /Cprogram /E:XXXX
This option should also work for other menu programs like "PC Shell".
iv. Determination of free disk space
------------------------------------The implication of Cluster Size:
The XTreeGold-screen does display in the right-hand "Disk" resp. "Disk statistics" column the amount of available bytes, as well as the total number of files and the disk-space in bytes they occupy. By adding the numbers of available and total bytes, the sum is different from the denomination of your hard disk's capacity and different from the amount reported by programs like CHKDSK. The reason for this different figures is determined by the way DOS allocates space in clusters. The size of these clusters normally depends on the partition size of your hard disk (and sometimes on the options your hard drive has been partitioned with). For instance, on a hard disk partition of 512 MB up to 1,023 MB, the size of each clusters is 16 kB, that means DOS allocates at least 16 kB for every file, even if it's contents would be less than 16 kB. So a file containing just 1 kB of data actually occupies a total of 16 kB of disk space. Now XTreeGold displays this 1 kB actually used, but considers 16 kB when determining the sum of available bytes. In this particular example, a disk partition with 1,023 kB available space left, would have only 1,007 kB available after adding an extra 1 kB file to it. The reason, ass describe above, is that the 1 kB file actually uses 16 kB of disk space (i.e. cluster size). If you now look to the "Extended Statistics" window (invoked by "?"), the "Slack Space" field displays the total amount of unusable space due to DOS allocation methods. The size of each cluster and the total amount of clusters on the respective hard disk partition is also given here.
v. AutoCAD (.DWG-file) viewing problems
---------------------------------------To be able to view AutoCAD (.DWG-files), XTreeGold needs to have at least 300 kB of free conventional memory.
To figure out the amount of free memory on your system, currently available in XTreeGold, just invoke the eXecute command (press key "X") in the main file or directory screen. A command prompt will be presented, and the amount of Free Memory is additionally displayed at the top line of the screen. If it reports less than 300 kB (307,200 bytes) available, you won't be able to view any AutoCAD files in XTreeGold. (Note that larger DWG-files may require even more available memory).
vi. Meaning of signs left to directory names
--------------------------------------------As setup by default, XTreeGold version 3.0x (contrary to all prior versions) does log only the files in the root directory, while all subdirectories remain unlogged. Therefore a "+" (plus) sign left to the directory name indicates that this directory is not yet logged into memory. In order to read this directory into memory, you have to highlight it and press ENTER or the "+" key. The "+" sign will disappear then, indicating the directory has been logged. In order to unlog a directory from memory, hit the "-" (minus) key (and the "+" sign will appear left-hand). To instantly log an entire branch (a directory with all its subdirectories) into memory, you have to highlight the parent directory and then hit the "*" (asterisk) key. Again, in order to unlog this directory (and also the entire branch), highlight the parent directory and hit the "-" (minus) key.
Note: A centered dot appearing left to a directory name indicates an already logged directory that has been hidden from display entirely or partly by using of the F5 or F6 keys (Refer to the corresponding entry in the Hidden Hotkeys section).
vii. Survey of tagged files
---------------------------XTreeGold has a hidden command that provides an instant survey of all the tagged files in the file window (the regular one, as well as in the branch, showall or global ones):
It is invoked by hitting CTRL-F4. Doing this, the file window will now show only all tagged files, while hiding all untagged ones from display.
viii. The 'B'ranch Command
--------------------------The 'B'ranch command, introduced with XTreeGold version 2.0, is a very powerful and versatile feature, that lets you perform some undocumented and rarely known, nevertheless utmost useful tasks. First of all, the 'B'ranch command will show you a list of all the files under the currently highlighted directory and all its subdirectories (the so-called "branch"). Furthermore, if you are in the branch-view mode (indicated by the same colours as the Showall and Global window), you can use ALT-'C'opy, ALT-'M'ove, or the built-in ZIP-archiving tool of XTreeGold, with a number of additional options on how to recreate the directory structure on the destination.
For an example, let us assume the following directory structure:
C:\
---DIRONE
------DIRTWO
---------DIRTHREE
------------DIRFOURNow, if you have the focus on the second directory, named "DIRTWO", invoke the Branch command by hitting key "B" and XTreeGold will take you to the branch-view window Move the cursor up and down to highlight some of the files shown, you'll notice, when you are on a file from the "DIRFOUR" directory, for instance, the path-display in the top-line of the screen will display the following:
c:\dirone\dirtwo\DIRTHREE\DIRFOUR
Note that all the directories *below* the directory on which you have invoked the Branch view are displayed in upper case letters, while all the parent directories are given in lower case!
Now let us invoke and ALT-'Copy or an ALT-'M'ove command, and, after specifying the destination directory, a prompt will ask you for selecting a new option:
Source: Paths are (full paths)
You can cycle to the other available option by hitting "P", and you will see what follows:
Source: Paths are (partial branch paths)
If you select the option "Paths are (full paths)", this does perform the same task as invoking ALT-'C'opy or ALT-'M'ove from the regular file window, while selecting option "Paths are (partial branch paths)" lets the directory where you have invoked the Branch view appear as root directory for the copy/move tasks.
With our example above, if specifying drive E:\ as destination, a branch structure as follows is being created on the target drive E:E:\
---DIRTHREE
------DIRFOURThis behaviour is nearly the same when you use the XTreeGold ZIP-archiving feature. Again returning to our example given above, let's invoke the "zip tagged files" command by hitting CTRL-F5, and now the following three Path-options (selected by hitting "P") will be presented to you:
Paths (Relative) This option uses only the directory names below the directory where the Branch view has been invoked, similar to the "Source: Paths are (partial branch paths)"-option in the ALT-'C'opy/ALT-'M'ove action mentioned above Paths (Full) Uses the original full path names for creating the ZIP file Paths (None) Files are zipped without any path information
ix. The Treespec command I
--------------------------The Treespec command has been introduced with XTreeGold version 2.5 . This very handy command enables you to browse the directory tree more faster and with less keystrokes than before.
The most basic use ot the Treespec command is to access a particular subdirectory within a multi-level directory structure:
1. Highlight the root directory
2. Hit the "\" key to invoke the Treespec command
3. Now type in the first (or the first few) letter(s) of the directory to be accessed (you will have to type in as much of the beginning letters of a directory as are needed to distinct it from other directories that begin with the same first few letters)
4. Hit the "\" key and enter another letter(s), if the directory to be accessed is a sub-directory
5. Now repeat step 4 as often until you finally are on your desired directory, and then hit ENTER!The directory you have selected with the Treespec command has now become an entry in the respective history list. So if you want to access this particular directory again, you just have to invoke the Treespec command and hit the up-arrow key to call the history list. Now you can instantly jump to any of the listed directories by highlighting it and pressing ENTER (regardless what drive you currently are on, even regardless whether the destination drive has already been logged or not!).
x. The Treespec command II
--------------------------There are even more handy tasks you can perform with the Treespec command:
Let's say, you are in the Showall- or the Global-view mode, and you find a seldom used file, residing in a rarely accessed complex subdirectory structure. With the help of the Treespec command you now are able to instantly jump exactly to that particular subdirectory with just one single keystroke! With your highlight bar on that file, simply press "\", and you will be taken directly to the directory your desired file is in!
Similar to the Filespec command, you also can toggle between your last two Treespecs used (as saved in the Treespec history) by hitting CTRL+"\" .
Also similar to Filespec, you can force XTree to start up with the cursor already on the last entered Treespec directory. This is done by adding the "/ZT" switch to the XTGOLD.COM command line call. (The corresponding Filespec switch is "/ZF", by the way).
You can simplify the XTree start-up with the last File- and Treespec entries by using a batch file, called for example "XTF.BAT" or so, that contains the following:
C:\XTGOLD\XTGOLD /ZT /ZF
xi. Printer redirection with XTreeGold 3.0x
-------------------------------------------XTreeGold version 3.0x enables you to redirect the printer output directly from within XTree itself. You can use one of these options after invoking the print command (key "P") by hitting "P" again; this will allow you to enter one of the following printer device names:
[d:]PRN, [d:]LPT#, [d:]COM#, CON, and TEMPFILE
Note: a preceding [d:] will redirect the printer to another machine (or server), "CON" will use the active console as output device (usually the screen), while the "TEMPFILE" option lets you save the printing output to a file named "TEMPFILE" in your XTreeGold directory.
xii. Print "Lines per page"-value options
-----------------------------------------Following below is a survey of options that may be entered at the "Lines per page" prompt (accessed by hitting "L" ('L'ines per page) after invoking the 'P'rint command (key "P"):
Lines Per Page: Result: 0 Forces XTree to dump the file contents without interpretation to the printer.
This works the same way as the DOS command "COPY FILENAME PRN"<5 If configured, use Printer tab expansion.
Don't use form feeds. After the end of each file two blank lines are printed.
If headers are on, each file begins with a page header.>=5 If configured, use Printer tab expansion.
Print a form feed to eject pages.
If headers are on, each file begins with a page header.65535 Works the same way as with the "<5" entry, except only the last page of a file is ejected with a form feed. Please note, if you use laser printers that automatically send a form feed when the last line on a page is printed, the "Lines per page"-value should then be set to one less than the maximum page size.
xiii. The ALT-'B'atch command
-----------------------------With the help of the ALT-'B'atch command you can execute any command on any file right from the file window. Just highlight the file, press ALT+"B", and enter the desired command with an argument (%1 - %5) representing the file.
Valid arguments are:
%1 = the current file's path and name e.g. C:\1993\AUGUST\TEST.DBF
%2 = the current file's drive id e.g. C
%3 = the current file's path e.g. \1993\AUGUST
%4 = the current file's name e.g. TEST
%5 = the current file's extension e.g. DBFYou can even enter multiple commands at the ALT-'B'atch prompt, by separating the commands with a double exclamation mark ("!!").
Here are some samples:
compile /r/q %1!!dir *.exe!!pause
compile /r %1!!dir *.exe!!pause
echo %1!!type %1 | more
pkunzip %1!!del %1
Every line you enter at the ALT-'B'atch prompt is also stored in the history file and can be recalled later by using the up-arrow key to invoke the history-list.
xiv. The CTRL-'B'atch command I
-------------------------------With the CTRL-'B'atch command XTreeGold provides a very powerful feature to instantly execute even complex tasks on multiple files.
The CTRL-'B'atch command is capable of creating batch files, that perform one or multiple DOS commands on a list of tagged files, using six different arguments (%1 - %6).
These are:
%1 = the current file's path and name e.g. C:\1993\AUGUST\TEST.DBF
%2 = the current file's drive id e.g. C
%3 = the current file's path e.g. \1993\AUGUST
%4 = the current file's name e.g. TEST
%5 = the current file's extension e.g. DBF
%6 = the current file's parent directory e.g. AUGUSTSimilar to ALT-'B'atch, multiple commands can be entered with a separating double exclamation mark ("!!").
To illustrate how it works, let us assume you have downloaded a number of ZIP-files and want to extract the contents of each archive into a separate directory, and, after finishing that task, the original ZIP-file should be deleted.
To do this, perform the following steps:
1. Tag all the ZIP-files
2. Hit CTRL+"B" to invoke the CTRL-'B'atch command
3. Now enter any batch file name you like, for instance "BATCHZIP.BAT"
4. Then, at "Line Mask", enter "MD %4 !! PKUNZIP %1 .\%4 !! DEL %1"
5. To see the newly created file named "BATCHZIP.BAT" in the file window you may now have to press ALT-F3 in order to relog the current directory
6. Then simply execute this "BATCHZIP.BAT" batch-file. It will create the needed directories, extract the contents of the ZIP-file to the respective directory, and finally delete the original ZIP-file!
xv. The CTRL-'B'atch command II
-------------------------------There is a nearly unlimited number of powerful things you can do with the help of the CTRL-'B'atch command.
Following below is another handy and interesting example:Let us assume there are a great number of filenames with different length, and all of them should be added the character "Z" at the end of each filename, and at the same time all the file's extension should be changed to ".BAK".
To realize this, perform these steps:1. Tag all the files to be changed
2. Hit CTRL+"B" to invoke the CTRL-'B'atch command
3. Enter any name you like for the batch file, for example "ZREN.BAT"
4. At the "line mask" prompt enter: "REN %4.%5 %4Z.BAK"
5. To see the newly created file named "ZREN.BAT" in the file window you may now have to press ALT-F3 in order to relog the current directory
6. Now you can 'V'iew the contents of the "ZREN.BAT" file to make sure everything is as intended
7. Finally, you simply have to eXecute this batch file (highlight "ZREN.BAT" and hit "X" and ENTER) - that's it!
xvi. Predefined color sets
--------------------------Additionally to the options to change the screen colors at will, the XTreeGold versions 2.5x and 3.0x come along with no less than 30 different predefined color sets. In order to use them, invoke the configuration menu by hitting ALT+F10, then select item 2 "Display color selection".
Now you can call this predefined color sets by simply hitting either the number keys 1 to 0 from the upper keyboard row (*not* from the numpad!), or SHIFT-F1 to SHIFT-F10, or CTRL-F1 to CTRL-F10 !
(Refer to topic xii. of the Hidden Hotkeys List).
xvii. Application menu entries
------------------------------The XTreeGold versions 2.5x up to 3.0x provide a very comfortable way to add an item to the application menu:
- Select the EXE, COM or BAT file you want to add to the menu
- Then hit F9 to invoke the application menu
- Press "A" to add an entry, using a name of your choice and hit ENTER
- Now hit "E" to edit the script
- And finally, just press the "F2" key and see what happens:
XTreeGold automatically inserts a three-line entry, that will perform the required drive and path change and then call up your desired application!
xviii. Partial untag
--------------------All XTree(Pro)Gold versions make available a smart function to continue a multiple tagged files copy/move operation after an abort resulting from of a full target disk:
The Ctrl+F8 "partial untag" command in XTreeGold's file display (in pre-1.43 XTreeProGold versions this is Alt+F8 !) untags all files that already have been operated upon after a mass operation on tagged files has been canceled by the program. This lets you continue to perform any function on the remaining tagged files after hitting the Escape key.
Let's assume, for example, you have tagged 30 files on your hard disk and want to copy them to floppy drive A: with Ctrl-C. About half way through, the floppy fills up and you are encountering a "DESTINATION DISK FULL" prompt. That's the moment where the "Partial untag" function gets involved:
- Hit ESC to cancel the operation
- Insert another target floppy disk in drive A:
- Log to the floppy drive ('L'og "A:")
- Check if there is free space on your new floppy
- Hit the ">" key to switch back to your logged hard disk
- Press Ctrl+S to show all tagged files
- Then hit Ctrl+F8 to untag the files that already have been copied previously
- You can now continue to copy the rest of the files
by pressing Ctrl+'C'opy (and RETURN twice) !
---<>---
to be continued...
Last updated 05-22-18
---
XTree and XTreeGold are registered trademarks of Symantec Inc.
Windows and Windows95 are registered trademarks of Microsoft Corporation.
Other brands and products are trademarks of their respective holders.
FILE COMMANDS: Directory_view | Previous_file Next_file | large_Font /Help | |Top_of_page |