Menu.Folder

Description

Syntax

Parameters

folderPath
(string) path to the base folder
Optional, defaults to the logged in user's "Start Menu" directory.

Possible Values

  • full path to a folder
  • the name of any folder in the currently logged in user's profile folder, such as:
    • Application Data
    • Cookies
    • Desktop
    • Favorites
    • Local Settings
    • My Documents
    • NetHood
    • PrintHood
    • Recent
    • SendTo
    • Start Menu
    • Templates
  • any of the following Keywords:
    AllPrograms
    Menu of Start Menu Programs folders for All Users profile.
    Allprograms FFF
    Menu of Start Menu Programs folder FFF for All Users profile.
    NT4 only.
    AllStartMenu
    Start menu for All Users profile
    NT4 only.
    AllDesktop
    Desktop for All Users profile.
    NT4 only.
    personal
    Shortcut for current user's Favorites folder
    programs
    Programs folder from Start Menu for current user.
    NT4 only.
    programs FFF
    menu of Programs folder FFF (e.g. Accessories)
    NT4 only.
sFormat
(string) any combination of the following keywords indicating desired menu format
Optional.

Keywords

*all
Execute all commands/programs in folderPath, rather than displaying a menu.
*allclose
Close all commands/programs in folderPath, rather than displaying a menu.
*allcloseforce
Force closed all commands/programs in folderPath, rather than displaying a menu.
autocol n
Automatically starts a new column every n+1 entries.
Applies to top level menu only.
autocolall n
Automatically starts a new column every n+1 entries.
Applies to top level menu & submenus.
autosoftcol n
Automatically starts a new column every n+1 entries, without including a bar between the columns.
Applies to top level menu only.
autosoftcolall n
Automatically starts a new column every n+1 entries, without including a bar between the columns.
Applies to top level menu and submenus.
back
Bar or menu takes the default background defined in PPCD > Command Lists > Setup.
center
Centers menu on screen.
cmd 'cmdline' 'params'
Defines a command line & parameters to be executed with the selected file, where:
'cmdline'
command to be executed, in single quotes
'params'
parameters for 'cmdline', in single quotes
Use the _file_ variable or a "|" to indicate where the selected file is to be placed in the command line.
The command line & parameter strings that appear after the "cmd" keyword can optionally be enclosed in nested single quotes, unless the strings contain spaces, in which case single quotes must be used.
Example
  • Menu.Folder("desktop", "cmd 'c:\program files\2x\2xExplorer' '|*'")
empty
Empty folders will be included in the menu (normally, they are excluded).
exclude \"folders_list\"
Excludes all folders listed in folders_list, a comma-separated list of folders.
Examples
  • Menu.Folder(?"c:\temp", "exclude \"c:\\temp\\store, c:\\temp\\logs\"")
    • Shows a menu of the "c:\temp" directory, excluding the "store" and "logs" folders.
  • Menu.Folder(?"c:\temp", ?#exclude "c:\temp\store, c:\temp\logs"#)
    • Shows a menu of the "c:\temp" directory, excluding the "store" and "logs" folders.
Doesn't work with other exclusion-type keywords:
nofiles
 
nofolders
 
nosubdir
 
nosubmenu
 
explorer
Adds a menu entry with label "Explore" at the top of all submenus, a shortcut to open a single-paned Explorer window.
The entry can be:
  • left-clicked
    • to open a single-paned Explorer window on the selected directory
  • right-clicked
    • to show a Menu.Folder() menu for that folder, useful if files are not being displayed in the current menu.
    • Am getting an error when right-clicking explorer entry:

      Cannot access context menu for:
      c:\docs & settings\username\start menu\programs\
      Error occurred near line 1 which contained:
      Menu.Folder("programs", "explorer fileman \"open in explorer\" ")
explorer2
Adds a menu entry with label "Explore" at the top of all submenus, a shortcut to open a double-paned Explorer window.
The entry can be:
  • left-clicked
    • to open a double-paned Explorer window at the selected directory
  • right-clicked
    • to show a Menu.Folder() menu for that folder, useful if files are not being displayed in the current menu.
fileman \"lbl\"
Where lbl = label for the optional top item of submenus, created when the "explorer" keyword is included.
The "explorer" keyword must also be included in sFormat whenever "fileman" is used.
Example
  • Menu.Folder("programs", "explorer fileman \"Open in Explorer...\" ")
folderback
Adds a "Back" entry to the top of the menu, to go back to previous folder.
Only useful when NoSubDir is specified.
folderdots
Adds "..." to folder names.
Useful to highlight folders when NoSubDir is specified & icons are not used in menus.
foldershorcut
Expands all folder shortcuts in the menu.
foldershorcuts2
Expands foldershortcuts with names ending in "_x".
folderstart
Sorts menu entries so that folders are at the start.
noicons
Omits menu icons.
Only works if the Menu.Folder() command is not embedded in another menu.
maxtext n
Limits text labels to n characters.
mne
Powerpro assigns single character menu mnemonics to the first 36 items on the main menu, allowing them to be easily selected with the keyboard.
noext
File extensions are removed from menu item labels.
nofiles
Files are not displayed, only folders.
Useful with the "explorer" option to traverse large folder trees quickly.
nofolders
Omit all subfolders.
nosort
Menu items will not be sorted.
nosubdir
Dynamic subdirectories (that appear when the parent items are moused over) are not included.
The names of subdirectories are still shown, & if selected, a Menu.Folder() is shown for that subdirectory.
Doesn't work with "exclude" keyword.
nosubmenu
All files from all subdirectories will be listed in the main menu.
No folders are shown.
offset n1 n2
Positions the menu offset n1 characters to the right, & n2 characters below the mouse cursor.
n1 & n2 can be negative.
omit
Deletes the phrases in the "Omit strings..." edit box on the PProConf > Command Lists > Setup > All Bars and Menus > Config tab.
"omit" is applied before "maxtext n", if both are specified.
sortext
Menu items are sort by file extension.
sorttime
Sorts most recently change files to the start of the menu.
tipall
Shows up to 6 lines of the file contents in the tool tip.
Some file types (text-based, such as .txt, .html, .ini) work better than others (such as .exe) with this keyword.
tiptext
Shows up to 6 lines of .txt file contents on tool tip.
tool tips
Shows tool tips, regardless of PProConf setting on Tool Tip Setup dialog.
under
Centers the menu under the mouse.
Zero \"vars_list\"
vars_list = space-separated list of variables to be set to 0 before the files are processed.

Examples

Notes

See Also