Wednesday, November 7, 2007

v6.50.0001 - 2007-11-07 12:57

  • +++ The natural next step in UDC: Parameters!
    One thing beforehand: Of course, it is the called application that controls (1) which parameters are recognized, (2) what they do, (3) what format they must have, and (4) in which order they are expected. So, to use this feature, you must know the command line syntax of the application you want to open files with.

    Examples
    ~~~~~~~~
    The possibilities arising from the support of parameters are absolutely astounding. For the following examples, I chose WinZip as the called application.
    - Example (1): Adding selected items to an archive. Open menu User | Manage Commands, and select category "Open With". Set the option to "Pass all the items to the same instance...". Then enter this line into the Application field in UDC Open With:
      winzip32 -a UDCmade.zip <items>
    <items> is a new XYplorer variable, that in this context is set to a blank-separated list of all currently selected list items. Triggering this UDC will create (if not already existing) the archive UDCmade.zip in the current path and pack all currently selected files into it. If want the *.zip in some other place than the current path, state it with the desired full path.
    - Example (2): You may as well use XY date variables, e.g.:
      winzip32 -a UDCmade-<dyyyymmdd>.zip <items>
    will create UDCmade-20071107.zip if today is 2007-11-07.
    - Example (3): Create a password protected archive and name it depending on the current folder:
      winzip32 -a -s"Secret password " <curfolder>-Secret.zip <items>
    Remember that the quoting of the blank-containing password is part of WinZip's command line syntax! XYplorer is just passing this on to WinZip.
    What XYplorer does, however, is resolving the new XYplorer variable : it is set to the name of the current folder (not the whole path).
    - Example (4): Extracting items from an archive to some folder:
      winzip32 -e <items>newfolder
    Will extract all items of the selected archive file into a newly created folder "newfolder" under the current path. Of course, you can as well give a full path for the target folder. Note that <items> here stands for the archive to extract! This example will only succeed when just *one* archive file is selected. This is a restriction of WinZip's command line syntax, not of XYplorer.
    - Example (5): Extracting items from an archive to some auto-named folder:
      winzip32 -e <items><curbase>
    The new XYplorer variable <curbase> will be set to the base (= name without extension) of the currently selected file (here: the archive to extract) -- it is always the file that is displayed in the statusbar. For the case that the base contains blanks, you should put it in quotes else WinZip will choke:
      winzip32 -e <items>"<curbase>"
    Of course, you can combine variable as you like:
      winzip32 -e <items>"<curbase>_<dyyyy-mm-dd>"
    If the archive is called "test.zip", this would create a subfolder named "test_2007-11-07" and unpack the archive into it.

    Notes
    ~~~~~
    - You will have noted the use of "winzip32" above. If the EXE to run is registered (known by the registry) it is not necessary to state the full path. Both ways will work the same:
      C:\Programs\WinZip\Winzip32.exe -a UDCmade.zip <items>
      winzip32 -a UDCmade.zip <items>
    Of course, the latter version is more portable, because it will call WinZip successfully on systems where it has a different installation path from your home system.
    - If you leave out the <items> variable, it is by default appended to the parameters. These two work identical:
      winzip32 -a UDCmade.zip
      winzip32 -a UDCmade.zip <items>
    - If the path to the EXE contains blanks it has to be wrapped in quotes, of course:
      "C:\Program Files\WinZip\Winzip32.exe" -a <curfolder>.zip <items>
    - BTW, a nice thing about this new parameters support: the UDC interface remains unchanged. XY just got more interpreting skills. And with them, an incredible power plus once again!
  • +++ Catalog: Parameter support as well! Everything stated here above for UDC is from the Catalog just as well! Enter the command line into the "Destination" field of the Item's Properties. e.g.:
      "C:\Program Files\WinZip\Winzip32.exe" -a test.zip <items>
    or simply
      winzip32 -a test.zip <items>
    Then select "Open Selected List Items(s)" (Ctrl+Shift+Click) from the context menu to trigger action.
    Notes:
    - When you select "Open" on such an item the application will just be opened without any parameters. This is a feature.
    - There's no icon yet with the short form "winzip32". Also some things need polishing and will be done in the next days, along with a general pimp up of the Catalog...
  • * Catalog: Open Selected List Items(s) (Ctrl+Shift+Click) now is hard-coded to pass the items to a single instance of the run application. Before, it called an instance for each item. Later, this will be made configurable.
  • * UDC dialog: the properties frame is now marked as "dirty" by a little asterisk.
  • % Rename Preview: exponentially faster for rename jobs using an increment pattern (e.g. <#0001>). When renaming more than 1,000 files this speed up will get quite notable.
  • ! Menu View | Current Tab | Sort By | Sort Folders Apart: did lose Find mode when applied to search results. Fixed.
  • %%% Dropping messages from Outlook / Outlook Express is now about 50 to 100 times faster than before! I always wondered why it is so slow. Then I found out... :)