Community
    • Login

    Open long path/ file name error since 7.5.9

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    10 Posts 6 Posters 5.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • archerarcher1A
      archerarcher1
      last edited by

      When a path + file name is very long (don’t know exactly when it starts to happen) I am unable to open the file by double clicking on it. NPP tells me the file is not present and asks if it shall be craeted.

      When RMB on the file and say open with NPP it works fine.

      When I open NPP w/o a file opened and drag and drop the file into the NPP windows it works fine too.

      WIndows 10 x64

      Any idea?

      1 Reply Last reply Reply Quote 0
      • MrSimurqM
        MrSimurq
        last edited by

        I have exactly the same problem with long file names on Windows 7 x64 (using 32-bit version of Notepad++ 7.6).
        I’ve tried to remove blank spaces between file name chars to no avail yet…
        Any help is appreciated!!!

        1 Reply Last reply Reply Quote 0
        • MrSimurqM
          MrSimurq
          last edited by MrSimurq

          After some research, I think I found the solution to the problem here: Spaces In Pathnames

          This code works for me:

          [code]Windows Registry Editor Version 5.00

          [HKEY_CLASSES_ROOT*\shell\Open with Notepad++\command]
          @="“C:\Notepad++\notepad++.exe” “%1"”[/code]

          1 Reply Last reply Reply Quote 1
          • PeterJonesP
            PeterJones
            last edited by

            @MrSimurq ,

            As I mentioned in the other topic, this forum uses Markdown, which mangles posted code unless you properly escape it: in Markdown, you escape a code block by indenting every line by 4 chars, not by surrounding with [code] tags.

            To make it easier for @archerarcher1 (and others who read here later), please re-post your quoted registry entry, this time indented by 4 characters, like my example from that previous post,

                Windows Registry Editor Version 5.00
            
                [HKEY_CLASSES_ROOT\txtfile\shell\Notepad++]
                @="Notepad++"
            
                [HKEY_CLASSES_ROOT\txtfile\shell\Notepad++\command]
                @="C:\\Program Files (x86)\\Notepad++\\notepad++.exe \"%1\""
            

            so that it renders like

            Windows Registry Editor Version 5.00
            
            [HKEY_CLASSES_ROOT\txtfile\shell\Notepad++]
            @="Notepad++"
            
            [HKEY_CLASSES_ROOT\txtfile\shell\Notepad++\command]
            @="C:\\Program Files (x86)\\Notepad++\\notepad++.exe \"%1\""
            

            … so that we can see the exact text you used in your registry, without ambiguity.

            1 Reply Last reply Reply Quote 1
            • MrSimurqM
              MrSimurq
              last edited by

              Thanks, PeterJones!

              Yes, I merged the following code in my registry and now v7.6 can open files with long names on different drives. I found the solution here: Spaces In Pathnames

              Windows Registry Editor Version 5.00
              
              [HKEY_CLASSES_ROOT\*\shell\Open with Notepad++\command]
              @="\"C:\\Notepad++\\notepad++.exe\" \"%1\""
              
              1 Reply Last reply Reply Quote 1
              • archerarcher1A
                archerarcher1
                last edited by

                This behavior is a JOKE, isn’t it?

                Sorry.

                Meta ChuhM 1 Reply Last reply Reply Quote 0
                • PeterJonesP
                  PeterJones
                  last edited by

                  Yep, Microsoft was crazy to require you to disambiguate between program.exe name with space passing three arguments to program.exe and program.exe "name with space" passing just one argument to program.exe, even when you have the four files “name with space”, “name”, “with”, and “space” all in the same directory, because it should be able to always know exactly what you mean, even when you don’t use the syntax that the OS requires.

                  1 Reply Last reply Reply Quote 1
                  • Meta ChuhM
                    Meta Chuh moderator @archerarcher1
                    last edited by Meta Chuh

                    @archerarcher1

                    yes definitively a joke, even windows 10 has the same old limit of 255 char path lengths (minus another few characters, depending on local file systems or network drives) and sometimes even more issues if splitted to more than one argument, as many internal executables, like explorer, have a limit on how many arguments you can pass to it.

                    currently you’d have to get a mac, if you have cases where you just don’t want to live with window’s path length and argument count limits, as even some ubuntu internals are known to produce an overflow from time to time (albeit only at a much larger, rarely achieved dimension).

                    1 Reply Last reply Reply Quote 0
                    • Peter SmithP
                      Peter Smith
                      last edited by

                      You can use Long Path Tool to solve your problem. It will really help you.

                      1 Reply Last reply Reply Quote 0
                      • Tom_Cox001T
                        Tom_Cox001
                        last edited by

                        I suggest you try Long path tool is the very good

                        program for easily delete, copy & rename long path

                        files, error, unlock solution.
                        Try it and solve your problem.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors