1. Contents ßßßßßßßßßßß YAFM V2.1a Copyright (C) H.Snip 1991-1993 1. Menu 2. Help on help 3. Quick reference 4. Global operations 5. File operations 6. Panel operations 7. File mark operations 8. Cursor movements 9. Configuring yafm 10. Macros: Introduction 11. Macros: Hotkey definition 12. Macros: Description field 13. Macros: Use dialog box 14. Macros: Control dos screen 15. Macros: Using marked files 16. Macros: Restrict execution 17. Macros: Reload and positioning 18. Macros: Swap option 19. Macros: Pause option 20. Macros: Create batch file 21. Macros: What you shouldn't do 22. Macros: Environment vars. 23. Jokers: Introduction 24. Jokers: List 25. Jokers: Examples 2. Help on help ßßßßßßßßßßßßßßß The online help for YAFM is executed by the external program PAGEVIEW. Pageview is a text viewer program which is called to display the help text for YAFM from the editable ascii file "yafmhelp.txt". Pageview is a program to view any ascii text file and can be used as as stand alone program. Pageview is self explaining. 3. Quick reference ßßßßßßßßßßßßßßßßßß Global Panel File Default macros ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Q=Quit S=Sort C=Copy F1,H=Help L=reLoad N=NewDrive R=Rename F2=Configure ' '=ShowDos M=MakeDir. DEL,D=Delete F8=ScrSaver X=eXecute F=Filter A=Attrib P=Purge F12=Ega I=InvertMarks INSERT=ToggleMark E=Edit O=OldMarks Z=Zip TAB=OtherPanel U=Unzip F9=ToggleStatus V=View F10=ToggleList ENTER=UserDefCmd GREYPLUS=MarkAll ESC=ToParent ENTER=ToSubdir F1()=Drive F2()=Path F3()=Base F4()=Extension F5()=OtherDrv F6()=OtherPath F7()=FullFile F8()=OtherFile 4. Global operations ßßßßßßßßßßßßßßßßßßßß Global operations do not affect files or panels. 'Q' : Quit this program. [--] 'H',F1 : Execute the online help using PAGEVIEW. [m-] F2 : Configure colors, screen saver, and macros. [m-] F8 : Start screen saver. [m-] ' ' : Toggle between dos screen and YAFM screen. [--] 'X' : eXecute dos command [-*] F12 : Toggle between ega- (50 lines) and normal mode [--] ³³ Implemented as a macro ÄÄÄÄÄÙ³ Command works on marked files ÄÄÄÄÄÄÙ 5. File operations ßßßßßßßßßßßßßßßßßß File operations affect marked files or the hilited file. 'A' : change file Attributes [-*] DEL,'D': Delete file [-*] 'C' : Copy file [-*] 'R' : Rename file [-*] 'Z' : compress (using pkZip, Arj, Arc) file or directory [m*] 'U' : Uncompress file [m-] 'E' : Edit file [m-] 'V' : View file when cursor is located on file [m-] ENTER : Execute enter macro for file under cursor [m-] ³³ Implemented as a macro ÄÄÄÄÄÙ³ Command works on marked files ÄÄÄÄÄÄÙ 6. Panel operations ßßßßßßßßßßßßßßßßßßß Panel operations affect the current panel or directory. 'F' : Filter files, display only specified file groups [--] 'S' : Sort files by Date/Time, Name, Size or Extension [--] 'L' : reLoad file information from disk (refresh panel). [--] F9 : Toggle panel status line display mode. [--] F10 : Toggle filelist display mode. [--] 'M' : Make new directory. [--] 'N' : Show new drive / and or directory in panel. [--] 'P' : Purge files (delete unwanted files such as *.bak) [m-] ³³ Implemented as a macro ÄÄÄÄÄÙ³ Command works on marked files ÄÄÄÄÄÄÙ 7. File mark operations ßßßßßßßßßßßßßßßßßßßßßßß File mark operations affect file markers. INSERT : Toggle file mark GREY PLUS : Mark all files GREY MINUS : Unmark all files 'O' : Restore Old marks 'I' : Invert file marks 8. Cursor movements ßßßßßßßßßßßßßßßßßßß This section describes the commands that move the cursor Up, Down : Go up/down one line Home,End : Go to first/last file in panel PgUp,PgDn : Go one page up/down +key : Incremental file-lookup ESC : Goto parent directory ENTER : Goto sub directory (*) Ä¿ 'V' : Load and view sub directory (*) Ä´ TAB : Go to other panel ³ Left,Right : Go to left,right panel ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ  (*) These commands have other meanings when the cursor is located on a file. 9. Configuring yafm ßßßßßßßßßßßßßßßßßßß The configuration of yafm is handled by the program "yafmcfg". This program, which can either be activated as a stand-alone program or as a part of the configure macro, enables you to configure the following: o) Macro definitions o) Colors o) Screen saver settings o) Wether or not you want exploding windows The yafmcfg program can be executed in three ways: o) From dos o) From within yafm o) Using the standard reconfigure macro which is assigned to F2 by default. 10. Macros: Introduction ßßßßßßßßßßßßßßßßßßßßßßßß YAFM Macros are very powerfull. You can define macros and execute them as if they were built in commands. A YAFM macro consists of two parts: 1) A batch file implementing the macro. In this batch file you may refer to the current directory, the filename under the cursor or even parts of the filename under the cursor. For this purpose yafm has defined a number of environment variables that will be setup before the macro is executed. 2) A macro administration file. This administration file defines how yafm executes the macro. It defines wether or not yafm should prompt for additional arguments, wether or not the macro is allowed on directories or that the macro supports marked files. 11. Macro Administration: Definition of hot-key ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß To create a macro you should invoke the Configure command and choose the macro definition item. When you have started the yafmcfg program you will initially see one blank field: "Key assignment". This field will remain blank until you enter a valid key or combination of keys that can be used as a "hotkey" for the macro. When a valid hotkey was pressed the field will be filled with the name of the hotkey. Also a DISPLAY field will appear informing you wether or not the macro already exists or not. Above that a number of INPUT fields will appear on the screen. These fields allow you to tune the way YAFM executes the macro. 12. Macro Administration: Description field ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß The description field "Description" allows you to enter a short description of the macro. This is usefull because the description will be displayed (as are all other relevant configuration fields) as soon as you enter a valid hotkey. The description will remind you of what the macro does. 13. Macro Administration: Use dialog box ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß When you define a macro that needs additional arguments or user interaction you may want to enable the dialog box for the macro. There are two fields to control this: o) Use dialog box: This field specifies wether or not YAFM should pop-up a dialog box before the macro is executed. o) Title for dialog box: This field specifies the title to appear in the dialog box. This field will only appear when you have specified that a dialog box should be used. Example: See the standard eXecute dos macro (X). 14. Macro Administration: Control contents of dos screen ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß Yafm maintains two screens, the dos screen and the application screen containing the file panels. The following input fields control how yafm handles these screens when the macro is executed. o) Use dos screen: Lets you specify wether or not YAFM restores the dos screen BEFORE macro execution. o) Save dos screen: Specifies wether or not YAFM saves the dos screen AFTER the macro has been executed. This field will only appear when you have specified that the dos screen should be restored. Example: See purge (P) command (no restore or save) and Compress (Z) command (save and restore). 15. Macro Administration: Use marked files or not ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß To following fields control the behaviour of macros in relation to marked files. o) Use marked files: Specifies if the macro should operate on marked files rather than the current file when there are marked files. o) Store marked files in listfile: Specifies that the macro is able to process a list-file (filelist.yfm) containing a list of files to operate on rather than executing the command one file at a time. The file filelist.yfm will only exist when this option is used and there were marked files. This field will only appear when you have specified that the macro can be executed on marked files. Example: See standard macros for compression(Z) and editing (E). 16. Macro Administration: Restrict execution to files ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß The following field allow you to restrict the execution of the macro depending on what's under the cursor, a file or a directory: o) Allowed for directory: This field specifies if the macro is allowed to be executed on directories. o) Allow execution on parent dir.: This field specifies if the macro is allowed on the parent directory (..). This field will only appear when you have specified that the macro is allowed on directories. Example: See the standard edit (E) macro for restriction of all directories. See the compress (Z) macro for restriction of parent directories. 17. Macro Administration: Reload and repositioning ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß Some macros may cause that files are removed from, or added to the current directory. If that is the case you may consider to let yafm automatically reload the panel when the macro is executed. The following fields control reload options: o) Reload after executed: This field specifies wether or not yafm should perform a reload after macro execution. o) Reposition cursor after reload: This field specifies wether or not yafm should try to position the cursor to it's old location after having performed the reload after macro execution. This field will only appear when you havce specified that YAFM should perform a reload after execution. 18. Macro Administration: Swap option ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß When swapping is enabled yafm will swap to disk before it executes the macro. The result of this is that no memory is occupied by yafm while the macro is being executed. 19. Macro Administration: Pause option ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß When pause option is enabled yafm will prompt you to press a key immediately after having executed the macro. This allows you to view the result of the macro (dos screen) before the yafm screen is restored. 20. Macro Definition: Create batchfile ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß The macro batch file can either be defined from the configuration program (using the reconfigure macro (F2) or directly) or it can be written by hand. In either case you need to use a text editor. From the configuration program the default macro editor of your choise is called to let you define the macro. The order in which you define the macro parts (administration and batch file) is not important. In fact, the administration file is not needed at all. A default administration file will be generated when the macro is executed for the first time in that case. 21. Macros: What you shouldn't do ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß It is not very wise to change the EDIT and the file VIEW macro's. You may want to change them, that's fine. But it is not wise to change the purpose (editing / viewing) of the macros. The reason for this is that these macro's are supported and referred to by the installation configuration program (to start the editor of your particular choise or to start the file viewer of your particular choise). Also, be restrictive in changing the assignments of other standard macros's because this may lead to inconsistancy of commands and help files. 22. Macros: Environment variables ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß The following environment variables are available to you in macro batch files The environment variables should only be used in batch files for macros. DISK Current disk. "D:" DIR Current directory "\DEVELOP\YAFM\" BASE Current base name " yafm" EXTENSION Current extension ".exe" OTHERDISK Other disk "B:" OTHERDIR Other directory "\" FULLFILE Full file spec "D:\DEVELOP\YAFM\yafm.exe" FULLOTHERFILE Other filespec "B:\yafm.exe" ISFILE Yes when file "Yes" ISDIRECTORY Yes when directory "Yes" YAFMDIR The yafm directory "C:\YAFM\" 23. Dialog box jokers: Introduction ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß When entering strings in DIALOG boxes you can use special characters called jokers to refer to the name of the current file or parts of it. Jokers are equivalent to environment variables with the following exceptions: o) Jokers are expanded always before execution of every command, including internal commands such as Copy and Rename. o) Environment variables on the other hand will only be setup when executing macros. 24. Dialog box jokers: List ßßßßßßßßßßßßßßßßßßßßßßßßßßß The file jokers will be not be expanded until right before execution of the command and will be saved in unexpanded form in the command history. This allows you to use file jokers to execute on a list of marked files or to re-use the same command for different files. F1 () : Insert Drive identification of CURRENT panel in command F2 () : Insert Path of CURRENT panel in command F3 () : Insert Filename without extension of CURRENT panel in command F4 () : Insert File-extension of CURRENT panel in command F5 () : Insert Drive identification of OTHER panel in command F6 () : Insert Path identification of OTHER panel in command F7 () : Shortcut for F1F2F3F4 (). F8 () : Shortcut for F5F6F3F4 (). 25. Dialog box jokers: Examples ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß Example: Copy all files from current panel that do not exist in other panel: o) Mark all files in panel 1 o) Start entering a dos command by pressing 'X' o) Enter the command : "if not exist F8 copy F7 F8" This will appear on the screen as follows: "if not exist  copy   o) Or in plain english:  =  = The command will now be executed on all marked files because the filename arguments of the copy command will be substituted for each file.