Ask a question
quick access
- Forum home page
- Browse forum users
- Frequent questions
search for related topics
- remove from my forum
researcher:
Archived forums 181-200
>
General questions about building Windows PCs
Question
- 1
Log in to vote
Hello,
I'm trying to figure out if it's possible to exceed the 260 character limit of MAX_PATH described in the link below. This link discusses a workaround as a developer when using specific API calls. However, I am trying to manually override this limitation interactively using the explorer, without code. (Sorry if I didn't post in the right forum.) Does anyone know if it is possible to manually create paths longer than the MAX_PATH limit?
Here is another related article:
https://mspoweruser.com/ntfs-260-character-windows-10/
Thank you very much.
Kith
R.K. Howard
Monday, May 15, 2017 at 10:09 p.m
all the answers
- 1
Log in to vote
Hello,
I don't recommend it for compatibility with other software, but you can change the maximum path length:
(1) Run regedit.exe asAdministrative staff
(2) Pozycjonowanie [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
(3) Change data value [allow for long runs] (DWORD) that "1"
(4) Close regedit and restart Windows[notes]This can be applied to Windows 10.
________________________________________________________________
Adachi- author Adachi Tuesday, May 16, 2017 at 5:36 am
Tuesday, May 16, 2017 at 5:34 am
- 1
Log in to vote
Hello,
Thanks for posting here.
Used to change the path length limit.your linkProvide provides two methods.
1.
A registry key enables or disables the new long path behavior.
To enable the long path behavior, set the registry key to
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled (Reg_DWORD)
.Registry keys are not reloaded during the process. A restart may be required for all system applications to recognize the key value, as some processes may have started before the key was set.
Registry entries can also be checked through Group Policy at
Computer Configuration > Administrative Templates > System > File System > Enable NTFS Long Paths
.2.
You can also enable the new long-path behavior for your application via the declaration.
true Greetings,
Deer
Be sure to click "Mark as Answer" to resolve the answer to your question, if not, click "Unmark as Answer". This may be beneficial to other community members reading this thread. If you have any compliments or complaints about MSDN Support, please contact MSDNFSF@microsoft.com.
Tuesday, May 16, 2017 at 8:14 am
-
Log in to vote
Thanks for the replies so far. I know the registry key is hacked, but I'm too scared to try it right now. I'm really trying to understand how this will affect my daily use of Windows as a user and developer.
As a user, will I be able to create tracks that are 1000 characters long? If so, are there any other consequences for me as a user? Does the Member State have best practice guidelines?
Also, as a developer, I automate Explorer. I wrote an explorer shell that looks at all the Word (.docx) files on my network, opens them one at a time, and performs Word operations on them. Will this still work if the word document is somewhere in the folder structure under 260 characters?
Thank you for your help.
Kith
R.K. Howard
Tuesday, May 16, 2017 at 9:10 am
-
Log in to vote
Hi R Keith Howard,
I apologize in advance for misunderstanding your question and position.
If you are afraid to modify the registry, you should not make long runs.
This can have a bad effect on users (they must have the same problem as you).
____________
AdachiTuesday, May 16, 2017 at 9:19 am
-
Log in to vote
Sorry, I think I expressed my point wrong. I'm not afraid of the registry. I know a lot about registries. I have modified it before. For my question, please treat me as the only user. I am an advanced user and developer. However, I still don't understand exactly what the behavior will be when I make this change, so I've rephrased the question above.
Thank you very much.
Kith
R.K. Howard
Tuesday, May 16, 2017 at 9:30
-
Log in to vote
From a developer's point of view, supporting new features will affect the app's compatibility with Win7/8.1.
As for Win10, I suggest enabling long path support in the VM and doing some testing.
Tuesday, May 16, 2017 at 11:07 am
-
Log in to vote
Tak, RLWA32,
Indeed, using a long pass is a painful decision.
But I want to choose the traditional way. (A young programmer in his sixties)Tuesday, May 16, 2017 at 11:53 am
-
Log in to vote
As the OP mentioned, opening a Word document in a network test might be appropriate to determine how Win10's long path support over the network is handled. The documentation I've seen doesn't specifically mention how this is done. For example -
Does the network on the server (with long paths enabled) support long paths?
What if the remote drive is running on Win10 without long path support enabled?
What if the remote drive is on a non-Win10 system like Win7/8.1 or even Linux?
Tuesday, May 16, 2017 at 12:25 p.m
- 6
Log in to vote
Interestingly, the documentation on MSDN is wrong.
The first link you go to says you need to enable a registry key or enable group policy (essentially setting a registry key) or show apps. Well, on a system I've upgraded to the Creators Update, enabling group policy/setting the registry value to 1 prevents Explorer from creating paths longer than 260 characters.
Yes, I actually asked the explorer to show this message. Also, to show the longest path I can create in the explorer, here's what it looks like in the console.
If you go to the Group Policy setting instead of setting a registry key, the description is as follows:
"Enabling Win32 long paths will allow displayed Win32 apps and Windows Store apps to access paths that exceed the normal limit of 260 characters per node on filesystems that support them. Enabling this setting will make large chunks available In the process of."
Well, yes, you can mess with any manifest app (which is all apps these days), but if you remember that explorer won't let you create paths longer than 260 characters, even with the option enabled, your only option is that you need both to access paths longer than 260 characters using raw paths in file system operations.
So let's take a look at the Explorer manifest.
window casing resource manager There is no longPathAware in the manifest. This explains why Explorer cannot access paths longer than 260 characters.
in brief
It's not the same, you need to set the registry key setting to 1/enable group policy setting and make the application manifest contain the longPathAware setting so that the application ignores the 260 character limit. Explorer has no declaration entries, so it still respects the 260 character path limit.
Any samples provided by This is a signature are not intended for error checking or best practice demonstrations. It's just to illustrate a point. I may also provide inefficient code or introduce some issues to prevent copy/paste coding. This is because the main purpose of my posts is to help you learn.
Tuesday, May 16, 2017 at 12:35 p.m
- 2
Log in to vote
I almost forgot that the console can generate paths longer than 260 characters. The problem is that Explorer doesn't handle them properly, so it takes shortcuts in this case. Well, try it.
Any samples provided by This is a signature are not intended for error checking or best practice demonstrations. It's just to illustrate a point. I may also provide inefficient code or introduce some issues to prevent copy/paste coding. This is because the main purpose of my posts is to help you learn.
- author Darrena Rowe'a Tuesday, May 16, 2017 at 12:44 p.m
Tuesday, May 16, 2017 at 12:40 p.m
-
Log in to vote
Thanks Darlan! I think I need a few days to digest it all. Let me think about it, I'll be back.
currently.
Kith
POSTSCRIPT. I have a feeling I'm going to regret taking this route! :) However, I have been struggling with this limitation for years.
R.K. Howard
Tuesday, May 16, 2017 at 1:05 p.m
-
Log in to vote
As an alternative quick and dirty solution - you can map a drive letter to a directory in the tree where all paths < MAX_PATH start (using the subst command) or create a symlink.
-- dad
Tuesday May 16, 2017 at 1:34 pm
-
Log in to vote
Hello,
A little late, but great answer.
But the question is... where can I find these letters?
I would like to see these for cmd.exe and powershell.
In some posts we see people creating paths longer than 9000 characters. I can not
https://serverfault.com/questions/847142/cant-use-long-path-names-in-windows-2016Welcome
Wednesday, August 22, 2018 at 11:10
- 1
Log in to vote
>Where can I find these lists?I would like to see these for cmd.exe and powershell.
You can open cmd.exe from Visual Studio 2017. Use "Open With..." and select "Resource Editor".
Next, look at the RT_MANIFEST resource.
(spoiler: obalongPathAware=true)
-- dad
Saturday, August 25, 2018 at 2:51 p.m