ZTree Keyboard Macros (F12) |
---|
[UP] Macros Application Menu Configuring
All macro operations are built around the F12 key, making learning and using this feature surprisingly easy.
Contents |
Windows is notorious for discouraging, even making it impossible, to automate anything. This elusively simple point-and-click environment forces the user to do all the work, all the time, many times, with the environment keeping no history of previous steps. With the exception of desktop shortcuts and macros in MS Office (used by only the most advanced users), there is no mention of automation or batch processing in this GUI environment.
Yet, decades ago, computer use always implied programming and automating tasks, with all the advantages that this brings. This was so natural in the command line world, and most users typically achieved a level of efficiency they were happy with by reducing the amount of typing they had to do and automating frequent tasks.
Not so today. Hundreds of millions of people spend endless hours interacting with a machine without realizing how much of their lives they waste by interacting via long-winded dialog boxes, constantly added and "enhanced" icons, themes, skins, and other eye-candy...
Using macros in ZTree requires some learning and discipline, both of which are psychological obstacles and a major challenge to our habits, thanks to the UI "evolution" from command line to point-and-shoot. The command line forced one to come up with command aliases, scripts and macros -- all wonderful inventions for reliably speeding up well-defined tasks.
The GUI wasn't designed to be automated, so the amount of user manual work is constant at best, but, of course, we know that it is ever-increasing. With no features built into the GUI to reduce the work (by automating, encapsulating), the number of clicks in a maze of options just keeps growing, taking a toll on your time, memory, nerves... It's very simple: if there is no way to memorize your clicks and other actions on the machine, the human is condemned to repeat them later over and over -- provided the organic human memory is still willing to co-operate...
Macros in general, and those in ZTree in particular, offload your memory and reduce complex tasks to just a few keystrokes, which are the only thing you need to remember.
If you don't find any of the examples shown here of any use, force yourself to observe how you use ZTree and spot one of those tasks that you do often (say, more than 3 times per session) and which consists of more than 5-6 keystrokes. It does not matter how trivial the task is. Then, store the keystrokes in a macro and start using it exclusively to perfom the task. When F12 followed by Alt+(bookmark) leading to the task becomes a habit, you are on your way, and you won't regret it!
Contents |
Contents |
You will remain in the macro editor/launcher mode. You can keep adding new macros to the macro history, commenting them, or adding bookmarks in this way as long as you like. Leave the editor/launcher mode by pressing ESC.
Contents |
Contents |
As your macro usage grows, you will want to "bookmark" macros by selecting them in the macro history and pressing Insert -- such macros will be marked with a special character and stay in the history list forever. If you don't bookmark your macros, they may eventually scroll off the history list, so take special care of frequently used and/or complex macros.
A much more useful and efficient way of bookmarking and executing macros is to use alphanumeric markers, rather than the above generic marker. 26 letters and 10 digits allow for a total of 36 unique bookmarks.
To make use of this feature, choose a letter or digit that you want to associate with the macro, 'A' for example. To create the bookmark, proceed as above, but instead of bookmarking by pressing Insert, press Ctrl+A. An 'A', rather than the generic marker, will appear next to the macro in the macro history.
The next time you want to execute this particular macro, just press F12 followed by Alt+A. This will recall and execute the macro for you -- you don't have to go searching for it in the history. In other words, macro execution (of your favorite 36 macros) can be reduced to just these 2 steps:
You may also choose to recall the macro from history, but not execute it immediately -- sometimes a wise thing to do:
In other words: F12,Alt+% = F12,Ctrl+%,Enter, where % stands for any letter (A-Z) or digit (0-9).
Contents |
However, there is faster method: if your macro is bookmarked with, say, letter M, instead of navigating, just press M, and the macro will be brought to the MACRO: prompt.
You may also press Alt+M to immediately execute it -- this shortcut works regardless of whether the history is visible or not!
Contents |
Fortunately, a chosen alphanumeric (or generic) bookmark character can easily be modified. When the macro history is called (F12, Up, for example), pressing Insert will simply remove any bookmark character (if there is one) next to the selected macro entry. If a bookmark character is not present, Insert will add a generic bookmark -- Insert is a toggle.
Similarly, pressing Ctrl+(bookmark) also works as a toggle -- it will add/remove an alphanumeric bookmark.
Using the above techniques, bookmark characters can be renamed and moved around until they make the most mnemonical sense to the user.
Note that ZTree will make sure that bookmarks are unique, so don't be surprised if sometimes nothing happens after pressing Ctrl+(bookmark). This simply means that the bookmark character is already taken and needs to be freed first.
Again, getting this right gives the user a collection of 36 2-keystroke commands (F12,Alt+(bookmark)) that greatly extend ZTree's power and boost productivity -- provided they become second nature.
Contents |
The easiest way of generating .ZTM files is to use the Ctrl+F12 function. It will record the macro in the {ZTWdir}ZSAVE.ZTM file automatically. Note that this file will actually be overwritten every time, so it may need to be renamed, if you want to keep the macro for future use.
Since .ZTM files are pure text files, they can be easily edited and comments added using ';' as the first character in a line. In addtion, comments can be safely added to the macro file by making use of the STOP directive.
Sample commented macro file (NETJUNK.ZTM) |
---|
;
; This is a sample macro file
;
\,ALT_I,*,b,f,ENTER,ALT_S,ASCEND,d,END,STOP,
Logs the "Temporary Internet Files" branch and sorts files by Date.
This directory must first be stored in the Treespec history and
bookmarked with I.
|
Contents |
But thanks to this extra level and the huge space provided by menus, many new possibilities emerge.
In addition, certain tokens (like #ZTversion) are only visible in F9 scripts. There are currently no similar environment variables, so going via F9 is often the only solution available to a programmer.
See examples:
Contents |
The most logical place to document macros is in the history list itself, by creating non-executing macro entries. There are at least two ways of doing this by using "comment" tokens.
If a macro starts with an 'x', it will start its execution with the shell eXecute command. The command interpreter (CMD.EXE, for example) knows how to ignore comments, so, putting 'x::' or 'xREM' at the beginning of a macro will not do anything! If this macro is executed by accident, it will do no damage, other than leave the user in the command line mode (and requiring ESC to be pressed).
Since ZTree also recognizes the STOP directive, it seems more appropriate to use that for neutralizing macros. This approach will not even have the overhead of launching the shell -- everything will be much cleaner and faster.
Below is a sample macro history list, with certain commented macros shown. Clearly, since history entries move around, the mix of executable and commented entries looks a bit chaotic.
Sample macro history |
---|
. ALT_X,NET USE %2 . x:: F Eject CD-ROM in drive F: ESC,LEFT,ENTER,ESC,LEFT,ENTER,ESC,LEFT,ENTER,UP,LEFT,LEFT . x:: L Locate the longest file names in current branch . x:: O Open (START) current file in a separate window . x:: P Popup the Windows Properties box for current file or dir . x:: I Log the "Temporary Internet Files" branch and sort files by Date . x:: C Copy current file to Clipboard STOP,CTRL_INS,w,t . ALT_X,C:\3\nteject E:,ENTER J ALT_R,D,e,ALT_X,C:\3\nteject E:,ENTER . STOP,In histories we must use Ctrl/Shift+Insert instead of ^C/^V . STOP,TODO: http://www.ztw3.com/forum/forum_entry.php?id=37248 . STOP,TODO: 37518 O ALT_X,start /min "Popup" "C:\3\context.exe" %1,ENTER L ESC,ESC,*,b,ALT_S,l,END,ALT_I I \,CTRL_I,ENTER,*,b,f,CTRL_I,ENTER,ALT_S,ASCEND,d,END 1 F9,1,*,ENTER . x:: S Search text files for some string . x:: E Mirror current branch tree (without any files) . x:: J Eject CD-ROM in drive E: P ALT_X,C:\1\propsfor.exe %1,ENTER,ESC V ALT_X,DIR %2,ENTER ... |
To make a ZTree history list more readable, you may do the following from time to time: quit ZTree and edit the ZTW.HST text file by grouping the comments on top of the list. If you don't attempt to execute any of the commented items, they will stay near the top forever, even as items on the bottom are added, deleted, or modified.
Sample macro history (edited) |
---|
. x:: C Copy current file to Clipboard . x:: E Mirror current branch tree (without any files) . x:: F Eject CD-ROM in drive F: . x:: I Log the "Temporary Internet Files" branch and sort files by Date . x:: J Eject CD-ROM in drive E: . x:: L Locate the longest file names in current branch . x:: O Open (START) current file in a separate window . x:: P Popup the Windows Properties box for current file or dir . x:: S Search text files for some string . STOP,In histories we must use Ctrl/Shift+Insert instead of ^C/^V . STOP,TODO: http://www.ztw3.com/forum/forum_entry.php?id=37248 . STOP,TODO: http://www.ztw3.com/forum/forum_entry.php?id=37518 . x:: -- The lines above are comments, executable macros start below -- . ALT_X,NET USE %2 . ALT_X,C:\3\nteject E:,ENTER J ALT_R,D,e,ALT_X,C:\3\nteject E:,ENTER O ALT_X,start /min "Popup" "C:\1\context.exe" %1,ENTER ESC,LEFT,ENTER,ESC,LEFT,ENTER,ESC,LEFT,ENTER,UP,LEFT,LEFT L ESC,ESC,*,b,ALT_S,l,END,ALT_I I \,CTRL_I,ENTER,*,b,f,CTRL_I,ENTER,ALT_S,ASCEND,d,END 1 F9,1,*,ENTER STOP,CTRL_INS,w,t P ALT_X,C:\1\propsfor.exe %1,ENTER,ESC V ALT_X,DIR %2,ENTER ... |
Here is yet another way of using the STOP directive, this time to put the comments at the end of the macro. You will be saving many history entries for real use, but potentially ending with some very long lines in the history.
Comments as part of the macro |
---|
... J ALT_R,D,e,ALT_X,C:\3\nteject E:,ENTER,STOP,-- Eject CD-ROM in drive E: O ALT_X,start /min "Popup" "C:\1\context.exe" %1,ENTER,STOP,-- Open (START) |
Contents |
Building or acquiring tested and documented macros extends ZTree's power immensely. In fact, the futile debates over mouse/keyboard, GUI/console applications, and other user interface matters become irrelevant in a mindset oriented towards a solutions-based approach to file management. ZTW becomes just another command line (scripting) utility, with its very special language.
Of course, building "solutions" requires learning the "language" (that is, the ZTree UI and knowing how to capture the keys with Ctrl+F12). However, using "solutions" requires absolutely no learning, just obtaining them from a reliable source and understanding what they do.
As it is, the macro language is quite powerful, but a few more enhancements would make it more robust and reliable.
Contents |
Contents |
The macro history list is where (shorter and simpler) macros typically live. In the examples below, an attempt was made to choose bookmark alphanumeric markers that can easily be associated with familiar file operations -- F12,Alt+C to Copy the Current file to the Clipboard.
The safest place to store, debug and test a macro is in a file. Here too, we have tried to come up with descriptive names for the .ZTM files. Feel free to apply your own naming convention, but, please, come up with one.
When macro tokens are highlighted like this, code outside ZTree is being executed (an external .EXE, .BAT, a shell command line, an explicit or implicit START command, etc.) via the x (eXecute) command.
When tokens are colored like this, an entry in the ZTree Application Menu is being executed via the F9 command. These entries are also external .EXE, .BAT, or shell commands, executed temporarily outside ZTree.
A token colored like this is a bookmarked history entry to be fetched by the macro.
The following terms will be used in the examples. Please refer to the ZTree online help (F1) for details:
Contents |
F12,Alt+0 | Rename ZSAVE.ZTM to ZSAVE_yyyymmddhhnn.ZTM (@RENAME_ZSAVE.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Renames the current #ZThome\ZSAVE.ZTM file, thus preserving its contents from subsequent macro
recording (Ctrl+F12) commands, that would otherwise overwrite it. To record macros, one may now
want to develop the habit of hitting F12,Alt+0 just before hitting the initial Ctrl+F12.
Scope: DIR and FILE views. Split mode may be on or off. Origins: 1 NOTE: This macro would be unnecessary if ZTree had a configuration option that would do some sort of renaming automatically whenever the initial Ctrl+F12 is hit. However, the macro is generic enough to be still useful for renaming (Viewing, Moving, Copying, Editing, Deleting, adding to an archinve, etc.) any other file needing special and frequent attention. |
||||||||||||||||||||||||||||||||||||||
Bookmark | 0 - Zero the macro recording environment for fresh use | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+1 | Release all drives except one (@LOG_H.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Releases all drives from memory, except one (drive H in this case).
Scope: DIR and FILE views. Split mode may be on or off. Origins: Hartmut Schneider |
||||||||||||||||||||||||||||||||||||||
Bookmark | 1 - Leave only 1 drive logged | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+C | Copy current (text) file to Clipboard (@COPY2CLIP.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Copies the current file to the Windows Clipboard for later global use by
any application. Most applications support copying and pasting
to/from the Clipboard as a very practical and efficient means of exchanging data.
Scope: FILE view with a current (highlighted) file. DIR view will also work, provided there is at least one file in the directory. Split mode may be on or off. NOTE: Copying files other than text files may give unpredictable results. |
||||||||||||||||||||||||||||||||||||||
Bookmark | C - Strongly associated with copying and the standard Windows Ctrl+C keystroke. | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+A | Append current (text) file to Clipboard with advance (@APPEND2CLIP.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Appends the current file to the Windows Clipboard and moves the cursor to the next file.
Scope: FILE view with a current (highlighted) file. DIR view will also work, provided there is at least one file in the directory. Split mode may be on or off. NOTE: Appending files other than text files may give unpredictable results. |
||||||||||||||||||||||||||||||||||||||
Bookmark | A - Append | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+E | Open current directory in Explorer (@EXPLORE.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Use this macro when you really must open Explorer and work in the directory you are currently
looking at in ZTree. You will bypass that painful Explorer navigation.
Origins: 1 Scope: FILE, DIR and Autoview views. Split mode may be on or off. Note: Because Explorer uses commas as a delimiter, the COMMA token needs to be used to handle this bizarre convention. Also, experiment by removing the /select,"%2:%3" switch from the macro -- Explorer will behave differently. |
||||||||||||||||||||||||||||||||||||||
Bookmark | E - Strongly associated with Explorer and the standard Windows Win+E shortcut. | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+F | Find string in file(s) (@SEA_BETA.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Searches a frequently used set of files for a frequently used string, in Autoview mode.
In the example below, C:\ZTree\BETA*.TXT files will be searched for bugfixes that involved
the Alt+F5 keystroke.
Scope: FILE and DIR views. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||||
Bookmark | F - Find | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+L | Locate files with the longest file names (@LONGEST.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
ZTree has a unique feature for sorting files by their name length. This is often needed when
programs (like those used for staging CD-ROMs for burning) complain about certain
file names being too long. This macro will pinpoint them easily.
Try this on your Profiles\Favorites folder, for example.
Scope: FILE, DIR and Autoview views. Split mode may be on or off. | ||||||||||||||||||||||||||||||||||||||
Bookmark | L - Longest file names locator | ||||||||||||||||||||||||||||||||||||||
Code |
| ||||||||||||||||||||||||||||||||||||||
F12,Alt+Y | Mirror an empty tree structure (Interactive) (@MIRROR_I.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Mirrors (duplicates) the current branch without copying any files. This macro
does all the work and then places you in the Destination Directory Picker (F2), where you
decide where you want the tree created. You also have to decide how much of the source
path you want replicated.
Scope: FILE, DIR and Autoview views. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||||
Bookmark | Y - emptY tree | ||||||||||||||||||||||||||||||||||||||
Code #1 |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+M | Mirror an empty tree structure (Automatic) (@MIRROR_A.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Mirrors (duplicates) the current branch without copying any files. This macro is totally
automatic (unlike Alt+Y): by setting up the target directory in the other pane of a Split view,
you will not need to answer any questions.
Scope: FILE and DIR. Split mode must be on. |
||||||||||||||||||||||||||||||||||||||
Bookmark | M - Mirror | ||||||||||||||||||||||||||||||||||||||
Code #2 |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+R | Rename dir/file to Word Caps format, then advance (@WORDCAPS.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Renames files or dirs to the Word Caps format. For example, "john LENNON.txt" becomes
"John Lennon.Txt" and "\TREE" becomes "\Tree". Once the macro is executed, it becomes the
current macro, so it can be followed by Alt+F12 (which auto-repeats) to rename a large number of
files to the above (or any other) desired format.
Scope: FILE, DIR and Autoview views. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||||
Bookmark | R - Rename | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+2 | Synchronize two directory branches (@SYNC2DIRS.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Preparation: the screen is split (F8) into the left (source dir) and right (target dir) panes.
The dirs must be chosen carefully. The results will be - interesting - if the branches overlap!
The two directories and their subdirectories (branches), if any, will then be synchronized,
resulting in two identical areas, without any extra or missing files in either of them.
This is similar to a clean ZTree Mirror operation, but without unnecessarily moving identical
files.
Scope: FILE and DIR views. Split mode must be on. Origins: 1 2 |
||||||||||||||||||||||||||||||||||||||
Bookmark | 2 - Synchronize 2 directories | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+9 | Process tagged files using F9 batch scripts (@TAG_F9.ZTM) | ||||||||||||||||||||||||||||||||||||||
Description |
Creates the C:\TEMP\LONGLST.$$$ file from the currently tagged files and jumps to the
first script in F9 that starts with the string "9". The macro then stops, allowing the user
to select an item and press Enter to execute it. This allows operations that go beyond those
provided by ZTree's powerful Ctrl+Batch, Alt+Batch and other built-in tag-related features.
In fact, any function that ZTree cannot (currently) do with tagged files directly, can
probably be implemented via this mechanism.
Scope: FILE view only with at least one tagged file. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||||
Bookmark | 9 - Batch process tagged files via F9 | ||||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||||
F12,Alt+V | Upgrade running ZTW.EXE from ztwNNNNN.zip | ||||||||||||||||||||||||||||||||||||||
Description |
When you obtain a ZTree update in the form of a ztw15178.zip file (rather than the .EXE installer
version), place it in #ZThome and use this macro to upgrade to the new version. The result will be a
fresh version called ZTW.EXE (v1.51.78) and a renamed one called ZTW_v1.51.77.EXE, both running.
There are many ways to accomplish this upgrade, but this approach tries to do most of the work from within ZTree using its programming features and keystroke economy. Scope: FILE view with ztwNNNNN.zip selected. Split mode may be on or off. Origins: 1 |
||||||||||||||||||||||||||||||||||||||
Code |
|
01 | Multiple string searches (Version 1) | ||||||||||||||||||||||||||||||||||||
Description |
ZTree allows searching for a single string only (which was exploited in
another example). To search files for multiple strings requires coding a macro.
In this example, we'll search all .BAT files in the current directory that contain at least one
of the following srings: "CALL", "XCOPY" and "FORMAT".
However, this macro cannot be stored and used reliably in the history or in an external file.
Due to lack of a directive like IF_TAGS (and hence no checking), it must not be run blindly.
Its main "loop" will need to be recalled from the history and edited repeatedly.
Scope: FILE view. Split mode may be on or off. Origins: 1 |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
02 | Multiple string searches (Version 2) | ||||||||||||||||||||||||||||||||||||
Description |
This version will perform the same task, with a minor side-effect: it will not preserve
the current Split mode. It's shown here also to illustrate the power of merged tags.
Scope: FILE view. Split mode may be on or off. Origins: 1 |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
03 | Jump to last destination | ||||||||||||||||||||||||||||||||||||
Description |
This macro jumps to the last directory that was used in an operation like Copy or Mirror. It
illustrates the use of retreiving and then copying and pasting the user's most recent input.
Scope: FILE view. Split mode may be on or off. Origins: 1 |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
04 | Substituting drives | ||||||||||||||||||||||||||||||||||||
Description |
The SUBST shell command is useful for creating virtual drives from a directory branch such as
C:\WORK\MUSIC\MIDI.
This macro will make this easy, and also allow the user to choose the drive letter.
Of course, the user must know which drive letters are free. An enhanced, automated, version
of this could be coded using a batch file or an item in the F9 menu. The purpose of this
example is actually to illustrate the clever use of line editing a "template" macro
by sending arrow keycodes.
Scope: FILE view. Split mode may be on or off. Origins: 1 |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
05 | Substituting spaces with underscores in file names (@SPC2UNDER.ZTM) | ||||||||||||||||||||||||||||||||||||
Description |
Replacing spaces with dashes or underscores in file names is often needed for easier file
manipulation and more portable names in multi-platform environments.
This macro will locate all such files in the current branch and ask for confirmation before
renaming each matching file. It illustrates the power of the internal Rename masks and functions
that eliminate the need for specialized external programs or scripts.
Scope: FILE, DIR and Autoview views. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
06 | In Split mode, clone the other pane in the active pane (Treespec) | ||||||||||||||||||||||||||||||||||||
Description |
Force SPLIT mode and DIR view with identical directory and drive context in both panes.
Scope: FILE and DIR views. Split mode may be on or off, but the macro only makes sense if there are two panes with different contexts. Origins: Ben.Kent@aspelle.com |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
07 | In Split mode, clone the other pane in the active pane (clipboard) | ||||||||||||||||||||||||||||||||||||
Description |
Force SPLIT mode and DIR view with identical directory and drive context in both panes. Unlike
the previous macro, this one uses the clipboard as a mechanism for storing and retrieving treespec
information. The side effect is that the clipboard will be overwritten.
Scope: FILE and DIR views. Split mode may be on or off. Origins: Ben.Kent@aspelle.com |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
08 | In Split mode, clone the other pane's directory in the active pane (keeps drive) | ||||||||||||||||||||||||||||||||||||
Description |
Force SPLIT mode and DIR view with identical directory, if it exists, in both panes. Similar to the
above macros, but allows leaving the drive letter intact. This makes sense only in cases where the
same directories exist on both drives, otherwise, a random directory will be selected. For example, if many disks contain the \Data\Backup\Daily
directory, this macro may simplify navigation when performing repetitive operations.
Scope: FILE and DIR views. Split mode may be on or off. Origins: Ben.Kent@aspelle.com |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
09 | Check all files in a branch for readability | ||||||||||||||||||||||||||||||||||||
Description |
This macro searches all files in a branch for a non-existent string. This assures that every byte of
every file will be read. The files that remain tagged will be those with a potential problem.
Note that some system files (SOFTWARE, SECURITY, SAM, DEFAULT, etc.) will not be readable, which
is normal.
Scope: DIR or FILE view. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
10 | Check all files on a drive for readability | ||||||||||||||||||||||||||||||||||||
Description |
This macro is a variant of the preceding macro, except that all files on a disk drive are searched
for a non-existent string.
Scope: DIR or FILE view. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
11 | PUSH/POP (Saving/Restoring) the Windows clipboard | ||||||||||||||||||||||||||||||||||||
Description |
This macro demonstrates how the ZTree history feature can be used to temporarily save and then
restore the Windows clipboard. This allows ZTree to run a complex task that requires the global
Windows clipboard (an editor, as in this example), yet leave it intact. This is technically known
as a PUSH/POP operation.
Scope: FILE view, with at least one tagged file. Split mode may be on or off. Origins: 1 2 |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
12 | Create F9 script from current file's contents (@COPY2F9.ZTM) | ||||||||||||||||||||||||||||||||||||
Description |
This macro creates an F9 script at the very top of the currently active F9 database.
This may come handy when migrating many .BAT files from the file system to ZTree's
highly flexible and sophisticated program launcher and task organizer. Hundreds of files
could thus easily be moved to a database in a few seconds.
Scope: DIR or FILE view. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
13 | Prefix filename with its date string (@Prefix_with_yyyymmdd.ztm) | ||||||||||||||||||||||||||||||||||||
Description |
This macro renames current name.ext to yyyymmdd_name.ext.
Scope: DIR or FILE view. Split mode may be on or off. |
||||||||||||||||||||||||||||||||||||
Code |
|
||||||||||||||||||||||||||||||||||||
14 | Untouch file date and time | ||||||||||||||||||||||||||||||||||||
Description | This macro sets the file written date to the created date (then moves down the list ready for the next file).
Scope: FILE view. Split mode may be on or off. Origins: 1 |
||||||||||||||||||||||||||||||||||||
Code |
|
Contents |