Sign in to follow this  
Followers 0
tbaror

DirCopy to UNC path

2 posts in this topic

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

Share this post


Link to post
Share on other sites



Works fine for me:

MsgBox(0, "", DirCopy("d:\BIN", "\\ws1\c$\BIN"))

Check a path correctness.

Share this post


Link to post
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
Sign in to follow this  
Followers 0