Macro Save/Reload/Where Files



  • HI,
    How i backup my macro, for after uninstall/reinstall/sysformat…, so I can recharge them after that? Where NPP save my macros? How reload it? I no see menu option for it.



  • welcome to the notepad++ community, @HotBit-z80

    on a notepad++ default installation, your macros will be stored at %AppData%\Notepad++ in a file called shortcuts.xml.

    copy that file to a usb drive to restore it later.
    (best practice is to copy the whole %AppData%\Notepad++ folder, and restore it after a new installation, as it also contains other settings.)

    for everything else you would like to preserve, e.g. if you want to clone your complete notepad++ setup, including all plugins, we would need your debug information from the notepad++ menu ? > debug info... > copy debug info into clipboard.



  • Hi!,
    Uups, I found the shortcuts.xml file, but my macros are not there (just a macro named “Trim Trailing Space and Save” . where are my macros?



  • @Juan-Manuel-Carrillo-Campos

    We would need your “debug info” (see above for how to get it) to be totally sure, but see if there is a shortcuts.xml file in the same folder as your notepad++.exe file. If there is, check it for your macros.



  • my debug info:
    Notepad++ v7.7 (64-bit)
    Build time : May 19 2019 - 13:05:35
    Path : C:\Program Files\Notepad++\notepad++.exe
    Admin mode : OFF
    Local Conf mode : OFF
    OS : Windows 10 (64-bit)
    Plugins : ComparePlugin.dll DSpellCheck.dll mimeTools.dll NppConverter.dll



  • @Juan-Manuel-Carrillo-Campos

    as your local conf mode is off it means that the configuration files are stored
    within %AppData%\Notepad++. Did you search there?



  • @Juan-Manuel-Carrillo-Campos - I had the same issue that you faced, but after i closed notepad ++ then i was able to see the macro updated in shortcuts.xml at location %AppData%\Notepad++ . Hope this helps for others.



  • You may need to search in C:\Users\<localaccount>\AppData\Roaming\Notepad++
    Will be listed there, as shortcuts.xml with this format,

        <Macro name="MACRONAME" Ctrl="no" Alt="no" Shift="no" Key="0">
            <Action type="0" message="2013" wParam="0" lParam="0" sParam="" />
            <Action type="3" message="1700" wParam="0" lParam="0" sParam="" />
       </Macro>


  • @PorAhiViene-Pepe said in Macro Save/Reload/Where Files:

    C:\Users\<localaccount>\AppData\Roaming\Notepad++

    Please note: that assumes a standard Windows setup. One can tell Windows to place that folder in a different location. The environment variable %AppData% 🛈 encodes the right path for the ...\AppData\Roaming folder, so %AppData%\Notepad++, like @Ekopalypse said a couple years ago, and @Bharath-k said a few months back, is going to access the right spot, no matter how Windows is configured, and without having to edit the path: you can just paste %AppData%\Notepad++ into the Windows Explorer or File>Open address bar, and always get to the right place
    9223894d-5e52-4a26-9cfc-a6124b934689-image.png
    03ecf6eb-4916-4844-bca6-3e478656ab43-image.png


Log in to reply