Home › Forums › .NET libraries › Xceed SFTP/FTP for .NET › MoveTo error
-
AuthorPosts
-
#21073 |
I am trying to do a simple task of moving a PDF file from 1 network location to another. The application runs as a locally running service under the local administrator account and is trying to move a file from a local directory to one that exists on a mapped drive elsewhere on the network. Each time I try and execute the moveto command the following error gets generated
Error – An attempt was made to create a root folder. If the root folder is a removable drive, make sure a disk is inserted. Type: Xceed.FileSystem.DiskFolder FullName:
The code I am using is pretty simple Disk Y: is mapped to a drive on a remote machine and the local admin is authorized to see that drive
Dim OutputFile As New DiskFile(“Y:\outpdf.pdf”)
Dim InputFile As New DiskFile(“d:\sys\incoming\inpdf.pdf”)
Try
InputFile.MoveTo(OutputFile,
True)
Catch ex As Exception
buf = Err.Description
Return “Error – “ & buf
End Try
Any help would be greatly appreciated
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Gene (had 2852 views)
We recreated your scenario on our network and couldn’t reproduce the problem.
We also traced the code to see where this could happen, and there’s only one scenario in which this exception can be triggered: it is when the Exists property on .NET’s System.IO.DirectoryInfo class tells our component that Y:\ doesn’t exist. The component will then throw the exception you get because it’s illegal to create a root folder.
Could it be that your mapped drive somehow “disconnects” itself and is not available when your application runs?Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 2225 views)
I’ve created a mapped drive (Z:) on a Vista machine.
I’ve found out that sometimes the mapping is not working when I run a software that create a zip-file on the root of a mapped drive.
The drive-mapping allways works fine when browsing to it from the windows explorer, but not allways when the software that is using Xceeds zip-component is creating the zip-file on the mapped drive. It’s like it’s gone to sleep or something.
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Bjørn Willy (had 1436 views)
-
AuthorPosts
- You must be logged in to reply to this topic.