Questions tagged [max-path]
38 questions
4
votes
2 answers
Powershell: 'The fully qualified file name must be less than 260 characters'
I tried to use powershell command copy-item as xcopyto copy content of one disk to another one.
copy-item -Path h:\* -Destination g:\ -Recurse -Force
However, I encountered the following errors:
Copy-Item : The specified path, file name, or both…

Loom
- 9,768
- 22
- 60
- 112
4
votes
3 answers
How does Java circumvent the windows MAX_PATH WinAPI limitation
Does anyone know how Java is able to circumvent the windows MAX_PATH limitations. Using the below code I was able to create a really long path in Java and was able to perform I/O, which would have been impossible using windows without prefixing…

Rajiv
- 545
- 1
- 6
- 12
3
votes
1 answer
Java MAX_PATH equivalent?
Is there an equivalent of C's MAX_PATH constant in Java? Been troving the web for an answer and can't find one. Thanks

oldSkool
- 1,212
- 5
- 14
- 29
3
votes
0 answers
Long path support in Net.Framework 4.7.2 and Windows 10
To solve the problem of limiting paths to 255 characters, the following was done:
Windows 10 2004 includes "Enable Win32 long paths" in the "Local Computer Policy".
In the registry branch: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \…

Merkurius
- 31
- 2
3
votes
1 answer
Enabling Windows long file path support in PyInstaller application
I am running into an issue with a script I've built into an executable using PyInstaller. The script works fine when run as a Python script, but when run as a PyInstaller application, it fails when it encounters a file whose path is longer than 260…

blah238
- 1,796
- 2
- 18
- 51
2
votes
2 answers
Windows 10 Maximum Path Length Limitation
I am, like some before me, confused by the Maximum Path Length Limitation.
I successfully transferred a tree of files to a NAS using robocopy and a new Windows 10 machine.
On the source machine all files were in 260 characters limit. They were…

dm76752
- 93
- 7
2
votes
3 answers
Is MAX_PATH always same size, even if _UNICODE macro is defined?
Should I make room to it, like this:
len = MAX_PATH * sizeof(_TCHAR) + sizeof(_TCHAR);
or is:
len = MAX_PATH + sizeof(_TCHAR);
Right size to hold a path including unicode?

Jack
- 16,276
- 55
- 159
- 284
2
votes
1 answer
How to print the maximum valued path in a 2D array in Java?
I guess you all know the "strawberry" problem that some give you in job interviews, where you need to calculate the path between 2 corners of a 2D array that you can only move up or to the right and you have the calculate the maximum valued path.
I…

TomG
- 2,409
- 4
- 23
- 40
1
vote
0 answers
Is there a way to run a program if its path exceeds MAX_PATH?
I need to spawn processes from my C# program, but in some cases full path to an executable can be more then 256 characters.
I have studied several related topics on this site, as well as this article @MSDN. According to that information this should…

AndyH
- 383
- 1
- 8
1
vote
1 answer
Recursively copy folders with long file names (more than 260 chars)
I am trying to automate copy/replication of drives. Many of the drives have long file names, that fail the process midway.
I was using this copy command, but both these fail.
XCOPY /E c:\folder-you-want-to-copy\*.* C:\destinationfolder\
copy-item…

Transformer
- 6,963
- 2
- 26
- 52
1
vote
1 answer
LibGit2Sharp.NameConflictException "The filename or extension is too long."
I'm trying to clone a git repository using Repository.Clone.
Here's an example piece of code used for the clone command.
public string Clone(string remoteRepository, string path, string username, string password)
{
string myPassword;
…

Colin Dawson
- 435
- 2
- 12
1
vote
1 answer
Resolving long path (>260 char) limitation for accessing files/folders in latest Windows 10 build using Javascript
I am building a cordova windows application and get an error in accessing files and folders from my application that have path lengths greater than 260 characters because of the windows limitation. For accessing or creating new files and folders,…

user2444558
- 11
- 3
1
vote
0 answers
The filename or extension is too long. MAX_PATH exceeds
I have one file search API, using the API I have searched for a file to find the location the API returns the file location which the path length is more than 256 characters. When I try to go through the location using CMD I got the error as
The…

Bhuvanesh Waran
- 593
- 12
- 28
1
vote
3 answers
Shutil.copy IO Error2 when directory exists
I'm encountering a troublesome problem with my code and I've been unable to figure it out. Basically I am copying files from a local directory on my computer to a Dropbox folder that acts as a project repository for me and some other folks.
I keep…

user1819274
- 59
- 6
1
vote
1 answer
How to get around MAX_PATH in WinRT?
I want to be able to create files and folders inside of LocalCacheFolder without worrying that the total path length will be over 248 characters, which is currently a problem in my app. What is a good way to deal with this, besides making my app…

Factor Mystic
- 26,279
- 16
- 79
- 95