alphaleonis / AlphaFS

AlphaFS is a .NET library providing more complete Win32 file system functionality to the .NET platform than the standard System.IO classes.

Home Page:http://alphafs.alphaleonis.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Copying Files with Long paths

EricZimmerman opened this issue · comments

commented

If i have a source file with a long path, say 452 chars in length total (in directory names and the filename itself), can AlphaFS copy this to a different file of equal or greater length by just calling File.Copy(source,dest) or do i have to prefix the paths with \?\ for long paths?

it seems like from the docs the Copy method knows what to do, but i want to be sure i am doing things correctly and not adding my own work around to detect this, build a smaller path and recording the original much longer name, etc.

so in short, what is the best way to copy files with >255 chars in absolute path to another file with > 255 chars in the full path?

thanks for such an awesome project!

AlphaFS takes care of the long path prefix automatically, there's no need to specify this.

Also take a peek at the overloaded methods that support the PathFormat argument.

commented

many many thanks. just wanted to confirm i wasnt doing something stupid! =)