Can you move a file/folder across a network share in .NET?

Posted by Matt Thrower on Stack Overflow See other posts from Stack Overflow or by Matt Thrower
Published on 2010-04-15T16:00:37Z Indexed on 2010/04/15 16:03 UTC
Read the original article Hit count: 252

Filed under:

Trying to do this:

    Dim originalPath As String = "\\comp1\c$\target"
    Dim destinationPath As String = "\\comp2\c$\target"
    If Directory.Exists(path) Then
        Directory.Move(originalPath, destinationPath)
    End If

But it fails. Is there another way I can achieve the same effect?

© Stack Overflow or respective owner

Related posts about dotnet