File name specifiers in macros like in command line for user tools?

File name specifiers in macros like in command line for user tools?

61
Advanced UserAdvanced User
61

    Dec 29, 2004#1

    I just sent the following suggestion to IDM and was wondering how many of you would also find this useful in macros:

    "There is something I would find very useful in defining a macro -- at present, we have "CopyFilePath" which copies the full path and file
    name to the clipboard. Since we have %F, %P, %N, %E (and versions beginning with R for project equivalents) available in the Tool
    Configuration, why not make these available in macros as well? Right now I have to use CopyFilePath to a scratch file and then Paste, then
    find & replace "\" and/or "." or copy the bits I am interested in (e.g. just the file name or extension). Seems like this would be very easy to implement."

    6,603548
    Grand MasterGrand Master
    6,603548

      Dec 30, 2004#2

      No need for new macro commands for this. Just set up a few templates and use the templates in the macros. See Template Definition in UltraEdit help for details. A small extract:

      Code: Select all

      [FULL_FILE_NAME]  Is translated into the full path and filename of the active document.
      [FILE_PATH]       Is translated into the drive and path of the active document.
      [FILE_NAME]       Is translated into the root filename of the active document.
      [FILE_EXTENSION]  Is translated into the file extension of the active document.
      So create the templates

      FullName with content [FULL_FILE_NAME].
      FilePath with content [FILE_PATH].
      FileName with content [FILE_NAME].
      Extension with content [FILE_EXTENSION].
      NameWithExt with content [FILE_NAME][FILE_EXTENSION].

      These templates can be used in the macros with command Template TemplateNumber.
      Best regards from an UC/UE/UES for Windows user from Austria

      61
      Advanced UserAdvanced User
      61

        Dec 30, 2004#3

        Thanks -- I didn't know that templates could do this. However, there is still no option to get the project's path or name in a macro that I can see.