Open Project docs where full path in longer than 260 characters => does not work

Hi Aspose team,

during processing of Project documents I am hitting limit that documents that are with long path cannot be opened due to:

"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."

Considering that there are some libraries which can process long path (for example, AlphaFS => http://alphafs.alphaleonis.com/) it will be great that you extend also Aspose components to be able to go around this crazy Windows limitation as this is certainly possible.
Can you please check?

Thanks,
Oliver

Hi Oliver,

Thank you for writing to Aspose Support team.

In
presence of constructors that provide the capability to load documents
from stream, I think implementing this as a new feature is not
necessary. You can use the AlphaFS to load the document in FileStream and then use our API to load from this FileStream as shown in the following sample code.

Sample Code:

//using the AlphaFS library to laod the file
FileStream fs = Alphaleonis.Win32.Filesystem.File.OpenRead(“path to file”);

// Load the document into Aspose.Note.
Document oneFile = new Document(fs);

Thanks, this helped :slight_smile:

Hi again,

hope that I can ask additional question - do you have tip how to save changed document now?
Due to long path this has to be combined with AlphaFS also.

Thanks,
Oliver
Found solution :)
I tried first with:

FileStream fs = Alphaleonis.Win32.Filesystem.File.OpenWrite("path to file");

but correct is
FileStream fs = Alphaleonis.Win32.Filesystem.File.Open("path to file", IO.FileMode.OpenOrCreate);

BR,
Oliver

Hi Oliver,


Thank you for sharing your feedback. Please feel free to write to us if you have further query about the API.

Hi! If your issue is not solved yet I suggest that you use Long Path tool.