Jump to content

DirCopy to UNC path


Recommended Posts

Hi,

I need to copy some files to from script location to severals remote location i am trying to use DirCopy to UNC path but i get error

did i missed something?

Thanks

Func CopyTestDir(ByRef $clientList,$ServerList)
    
    _ArrayConcatenate($clientList,$ServerList)

    $LocalPath = @ScriptDir & "\NetAoutoTest"
    
    For $t = 0 To UBound($clientList) -1
        $NetworkPath = "\\" & $clientList [$t] & "\c$"
        
    If  DirCopy($LocalPath,$NetworkPath) Then
        
        MsgBox(0,"copy successful",$clientList [$t])
        
    Else
        
        MsgBox(0,"copy unsuccessful",$clientList [$t])
         MsgBox(0,"copy unsuccessful",$NetworkPath)
        EndIf
        Next
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...