$(FULL_CURRENT_PATH) but I'd like the dos 8.3 name for the path instead.

  • John Bowman

    John Bowman - 2014-06-30

    In my shortcuts.xml I have a usage of $(FULL_CURRENT_PATH) but I'd like the
    dos 8.3 name for the path instead. The program I'm calling doesn't like
    the spaces in the path - even when I encapsulate it in " s ... is
    there another variable available for this already? I couldn't find any
    online documentation :/


    THEVENOT Guy - 2014-07-01

    Hi John and All,

    Some hints :

    • The option \x of the command dir give you, both, the full and 8.3 names of any folder/file

    • If your press F5 to open the Run dialog of Notepad++, type the command below and click on the Run button :

    cmd /k for %A in ("$(FULL_CURRENT_PATH)") do @echo PATH 8.3 = %~sA

    You open a permanent DOS window , that displays the short name of the current N++ file

    • To write this full short path, in the current file, you need to create a script. I give you a solution with the NppExec plugin, but, I suppose it will be as easy with the N++ Python plugin ! Sorry, although I installed it, I haven't begun to use it and read its detailed documentation :-((

    So, press F6 to get the NppExec Execute dialog ( and eventually select <temporary script> ), just copy the three lines, below and click on the OK button :-)

    NPP_CONSOLE ? // Keeps the state of NppExec Console

    cmd /c for %A in ("$(FULL_CURRENT_PATH)") do @echo %~sA // Display the full SHORT path of the CURRENT file, in a TEMPORARY DOS window

    SEL_SETTEXT $(OUTPUT) // COPY this path, at CURSOR position or REPLACE the present SELECTION

    I wrote this post in a file named John Bowman.txt and located in :
    C:\Program Files\Notepad++\Lettres

    So, the inserted text is : C:\PROGRA~1\NOTEPA~1\Lettres\JOHNBO~1.TXT

    Hope this could helps you, somehow !

    Best Regards,


    P.S. :

    In a DOS window, instead of the dir /x command, you can run the command below, that displays SHORT paths of files, only :

    for %A in (*.*) do @echo %~sA

    Last edit: THEVENOT Guy 2014-07-01