locked
PathTooLongException RRS feed

  • Question

  • Is there any solution for the PathToLongException in Windows Store Apps with C#?

    I'm extracting a zip-file with a deep structure and I'm running into a PathToLongException. Is there any way to create the structure with the original names?

    I tried to create folders with shortnames and then rename the folders, but that didn't work, I ran into the exception again.

    Any ideas?

    PS:
    Since the root path of ApplicationData.Current.LocalFolder is about a length of 110, I really only have 150 chars left ...

    • Edited by tkrasinger Friday, September 13, 2013 8:41 AM
    Friday, September 13, 2013 8:37 AM

Answers

  • This isn't really a store api problem, it's going to be like that all across Windows.  You might have to offload the  processing to a server to fix the path issue.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, September 13, 2013 1:44 PM
    Moderator