Questions tagged [max-path]

38 questions
99
votes
9 answers

How do I find files with a path length greater than 260 characters in Windows?

I'm using a xcopy in an XP windows script to recursively copy a directory. I keep getting an 'Insufficient Memory' error, which I understand is because a file I'm trying to copy has too long a path. I can easily reduce the path length, but…
WestHamster
  • 1,297
  • 2
  • 11
  • 16
32
votes
8 answers

Should I deal with files longer than MAX_PATH?

Just had an interesting case. My software reported back a failure caused by a path being longer than MAX_PATH. The path was just a plain old document in My Documents, e.g.: C:\Documents and Settings\Bill\Some Stupid FOlder Name\A really ridiculously…
John
  • 1,974
  • 2
  • 25
  • 32
14
votes
2 answers

Inno Setup Compiler "Cannot find the path specified" error with long paths

I am using a .iss script to build an exe file inside Inno Setup Compiler. I need to package some node_modules into this application so I have a line under [Files] which looks like this: Source:…
Mike Eason
  • 9,525
  • 2
  • 38
  • 63
14
votes
5 answers

On Windows, when should you use the "\\\\?\\" filename prefix?

I came across a c library for opening files given a Unicode filename. Before opening the file, it first converts the filename to a path by prepending "\\?\". Is there any reason to do this other than to increase the maximum number of characters…
kgriffs
  • 4,080
  • 5
  • 37
  • 42
11
votes
2 answers

MAX_PATH limitation in Boost.Filesystem

I want to use Boost.Filesystem library to manipulate paths, files and directories. My question is are paths longer than MAX_PATH supported? I know that in Win32API we have workaround "\\?\" but it's not supported by basic functions like PathAppend…
SlavaNov
  • 2,447
  • 1
  • 18
  • 26
11
votes
7 answers

ASP.NET url MAX_PATH limit

I've found an issue with ASP.NET that I know at least has stumped one other person out there. We were trying to use an HttpModule to handle wildcard requests to a web application. The generated url is dynamic and could potentially be several…
Greg Ballard
9
votes
3 answers

C++ WinAPI: handling long file paths/names

I'm looking at handling longer file paths in my windows application. Currently, I have a text box (edit box) in which a user can type an absolute file path. I then read that typed file path, using GetWindowText, into a string declared like so: TCHAR…
user353297
  • 736
  • 1
  • 7
  • 13
9
votes
5 answers

Accessing files beyond MAX_PATH in C#/.NET

BACKGROUND I need to write a tool using .NET version 2.0 at highest (using something off the shelf is not an option for this client for political, commercial, and confidentiality/trust reasons) to migrate files from one server to another over the…
Jon Grant
  • 11,369
  • 2
  • 37
  • 58
8
votes
3 answers

C#: Any way to get around the 260 character limit of a fully qualified path?

Possible Duplicate: Why does the 260 character path length limit exist in Windows? I'm trying to figure out a way to get around this dreaded 260 character fully qualified path limit and at the same time I wonder why the hell is there a path limit…
michael
  • 14,844
  • 28
  • 89
  • 177
6
votes
3 answers

How to create directory exceeding MAX_PATH

For testing purpose, I would like to create on disk a directory which exceeds the Windows MAX_PATH limit. How can I do that? (I tried Powershell, cmd, windows explorer => it's blocked.) Edited: The use of ZlpIOHelper from ZetaLongPaths library…
sthiers
  • 3,489
  • 5
  • 34
  • 47
5
votes
1 answer

MAX_PATH in WinRT

I know that file system access in WinRT is different (read: isolated), but I'm curious if we still have to worry about MAX_PATH, or has that restriction been avoided?
codekaizen
  • 26,990
  • 7
  • 84
  • 140
5
votes
1 answer

OpenFileDialog returns empty string on paths over 260 characters (or doesn't return at all)

I'm writing a program that needs to read in files from anywhere on the system. Some users of the program have paths over the 260 character limit. The OpenFileDialog doesn't work with files with paths over 260 characters. I've tried using both…
cdicker
  • 69
  • 5
5
votes
2 answers

How do I get in python the maximum filesystem path length in unix?

In the code I maintain I run across: from ctypes.wintypes import MAX_PATH I would like to change it to something like: try: from ctypes.wintypes import MAX_PATH except ValueError: # raises on linux MAX_PATH = 4096 # see comments but I…
Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
4
votes
4 answers

Ruby - Project Euler # 18 - Maximum Path Sum

I've been working on some Project Euler problems, and for the most part, I've been doing pretty well. Problem 18, though has really stumped me. Starting at the top of a tree, I'm supposed to find the path that leads to the maximum sum 3 7 …
Darkmouse
  • 1,941
  • 4
  • 28
  • 52
4
votes
2 answers

How to get CreateProcess/CreateProcessW to execute a process in a path > MAX_PATH characters

I'm trying to get either CreateProcess or CreateProcessW to execute a process with a name < MAX_PATH characters but in a path that's greater than MAX_PATH characters. According to the docs at: http://msdn.microsoft.com/en-us/library/ms682425.aspx,…
dbyron
  • 501
  • 4
  • 9
1
2 3