Xcd FAR manager plugin v0.00b2 :)

Small FAQ/DOC

1. What's this?
This is FAR manager plugin, which allows you quickly access
"Special folders" ("My Documents", "Program Files", etc.), and
open such folders in "Change drive" menu (Alt-F1/Alt-F2)
Moreover, you can add any other file-system plugin (like Network
or Registry Browser) to "Change drive" menu.
I wasn't satisfied with plugins "FAR My Documents" by Andrey MAKEEV and
"SPECIAL FOLDERS" by Anton Geleznyak, so I wrote Xcd, which has more
capabilities.

2. How to use it?
Idea is a bit silly, but understandable - plugin treats command "xcd:",
where you should pass path. It expands following expressions enclosed in "%":
 - Environmental variables, for example %TEMP%
 - Path to itself %XcdPATH%
 - "Special folders" (read MSDN about SHGetSpecialFolderPath).
   Use it like this: %SF:PERSONAL%, or even %SF:5%, where 5 is
   code for SHGetSpecialFolderPath from shlobj.h
   See list of possible names in examples.txt
 - Paths from windows registry. The fact is that SHGetSpecialFolderPath
   don't return some useful paths, so it should be taken from registry.
   Path to "Program Files" for example can be taken in such way:
   %reg:HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir%
   Moreover, SHGetSpecialFolderPath don't work on W98rus with Russian paths.
 - %run:% - result of call to any your program. Read about it below.

So, you can add as many items to global FAR menu, as you like, and change
current directory. Also, you can make macros and so on.

Furthermore, plugin can add items to "Change drive" menu, and go to
specified directory (like "FAR My Documents") or open submenu (like
"SPECIAL FOLDERS").
Behavior is tuned in DiskMenu.ini, but you shouldn't do it directly
in text editor - do it through config menu. :)

Syntax is simple, and similar to FAR menu syntax - one item corresponds
to two lines. Hotkey (if you need it) and name is provided in first line.
Action is provided in second line. If action starts with "xcd:", then
it will simply go to specified directory.

Otherwise - it will go to directory, and call local (for this directory)
menu, where you can make any submenus and items you like, and call
"xcd:", or other plugin.
See examples - I hope you will understand everything.

There is a small feature - if command starts with "xcd:", then cursor
will be finally in the same panel, as it was in the beginning.
If it starts with "Xcd:", cursor will be in new panel.

If you provide "?" symbol after folder name, and sequence of key names as
they stored by FAR in the registry, it will simulate pressing these keys.
This way you can call any other plugin directly from "Change drive" menu
without any submenu.

3. About %run:%
Sorry, English translation of this item is not full, nevertheless it's enough
to understand.

xcd:%run:C:\x.bat% will run C:\x.bat with temporary file name in first
parameter. x.bat should write directory name to this file, and Xcd will
go to this directory.

See example - it sorts directories and jumps to first one.

By the way, I made enclosed expressions, but because of compatibility it's
a bit ugly - %( and %) are used as opening and closing brackets.

4. Why is it so ugly?
IMHO, special command "xcd:" is useful feature, all other can be explained
with valuable curvilinearity of my hands :)
Nevertheless you are free to e-mail: Nsky(!)users.sourceforge.net
(where (!) means angry anti-SPAM dog)
My homepage: http://www.bigfoot.com/~Nsky/