PathTooLongException is a C# exception that is thrown when a path or file name is longer than the system-defined maximum length.
Questions tagged [pathtoolongexception]
36 questions
0
votes
1 answer
Using long paths (>260) with .net 4.6.2 in Windows service
I have some code that has begun to throw the exception: TooLongPathException. So I did some research and found out that .net 4.6.2 solves this problem. Great!
The code that fails is code that moves and copies folders to different folders. I would…

Sigmundur
- 725
- 1
- 8
- 25
0
votes
0 answers
How to rename a fileInfo by adding \\?\ prefix to avoid System.IO.PathTooLongException?
I'm looking for a way to avoid System.IO.PathTooLongException. I read that I could put \\?\ in front of a long path.
The problem is that I have FileInfo objects and I ask me how to add the \\?\ path prefix to my FileInfo paths without writting…

Émile Pettersen-Coulombe
- 648
- 1
- 5
- 17
0
votes
1 answer
ERROR TYPE: System.IO.PathTooLongException FROM IP ADDRESS: 157.55.39.175 AKA Microsoft Bingbot
The details of the error notification are below. My question is how can I curtail the overwhelming number of Exceptions generated by Bingbots? What do I stand to lose, if anything, by doing so?
System.IO.PathTooLongException
IP ADDRESS:…

Erik Tammaru
- 40
- 1
- 6
0
votes
0 answers
How to invoke PathTooLongException?
I have a small utility that keeps hitting PathTooLongException and I was instructed to output the file path for the error, with is fine... somewhat.
However I find myself not able to replicate the issue. I tried creating a file with a path that is…

Idra
- 5,777
- 4
- 22
- 33
0
votes
1 answer
Publish Windows form application - path too long
I'm trying to publish my application, but the bin\Debug\App.publish\ ect path is too long. I've found out that you can change this default path in web project by doint this c:\shortPath\ in the publish profile file, but i can't figure out how to do…

Margo
- 672
- 3
- 13
- 30
-1
votes
1 answer
Using long paths in Visual Basic
I use the Directory.getLastWriteTimeUtc() method. If the path is too long for this method it throws an PathTooLongException. So I started to use Google finding a solution for this problem. A couple of search results adviced me to use \\?\ as a…

jp_
- 228
- 2
- 8