I have a Windows Service that is getting cought up on file paths that are longer than 260 characters. I have googled just about every combination of this problem I can think of as well as various other forums. From what I have read, Windows System.IO has a limitation on file paths of 260 characters or less. However Microsoft's latest release of Robocopy has support for 260+ characters. I have also read that a couple people mentioned unicode file paths which support up to 32,000. The limitation is set with the MAX_PATH and internet explorer and Robocopy use unicode filepaths to save long files.
My workaround right now is to trap and skip the folders while I would like in the future to be able to have paths longer than 260 characters. This right now is the ONLY work around, so the obvious "why dont you just move the folders?" response is out of the question.
My question is: Is there a way to use unicode file paths with the FileInfo class? Perhaps using PInvoke? Can you give an example for me?
Event Type: Error
Event Source: File Mirroring Service
Event Category: None
Event ID: 0
Time: 8:42:28 AM
An error occured:
The path is too long after being
View Complete Post