File.Copy

Jul 1, 2016 at 3:36 AM
Edited Jul 1, 2016 at 3:37 AM
Attempting to copy a long path from a local drive to a network mapped drive. Getting this:
System.NotSupportedException: The given path's format is not supported

Using 2 string variables, the contents of which are:
C:\shared\Siteworks\Users Shared Folders\Project Management\Project Files 2008\Project Files 2008\Mclaughlin. Kentfield\Proposal # 1913 Revision # 1 Chuck Haeuser Siteworks Landscape Inc Exterior Steel Guardrail and Handrail 44 Hill Drive Kentfield CA.pdf

and

Q:\Users Shared Folders\Project Management\Project Files 2008\Project Files 2008\Mclaughlin. Kentfield\Proposal # 1913 Revision # 1 Chuck Haeuser Siteworks Landscape Inc Exterior Steel Guardrail and Handrail 44 Hill Drive Kentfield CA.pdf

Exact error is:
System.Exception.ToString returned "System.NotSupportedException: The given path's format is not supported: [ C:\shared\Siteworks\Users Shared Folders\Project Management\Project Files 2008\Project Files 2008\Mclaughlin. Kentfield\Proposal # 1913 Revision # 1 Chuck Haeuser Siteworks Landscape Inc Exterior Steel Guardrail and Handrail 44 Hill Drive Kentfield CA.pdf]" & vbCrLf & " at Alphaleonis.Win32.Filesystem.Path.CheckValidPath(String path, Boolean checkInvalidPathChars, Boolean checkAdditional) in d:\Coding\Projects\GitHub\AlphaFS\AlphaFS\Filesystem\Path Class\Path.ValidationAndChecks.cs:line 192" & vbCrLf & " at Alphaleonis.Win32.Filesystem.File.CopyMoveInternal(Boolean isFolder, KernelTransaction transaction, String sourceFileName, String destinationFileName, Boolean preserveDates, Nullable1 copyOptions, Nullable1 moveOptions, CopyMoveProgressRoutine progressHandler, Object userProgressData, PathFormat pathFormat) in d:\Coding\Projects\GitHub\AlphaFS\AlphaFS\Filesystem\File Class\File.CopyMove.cs:line 1076" & vbCrLf & " at Alphaleonis.Win32.Filesystem.File.Copy(String sourceFileName, String destinationFileName, Boolean overwrite) in d:\Coding\Projects\GitHub\AlphaFS\AlphaFS\Filesystem\File Class\File.CopyMove.cs:line 78" & vbCrLf & " at CopyFast.Form1.ProcessFiles()" String