Jump to content
Sign in to follow this  

DirCopy to UNC path

Recommended Posts



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?


Func CopyTestDir(ByRef $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])
        MsgBox(0,"copy unsuccessful",$clientList [$t])
         MsgBox(0,"copy unsuccessful",$NetworkPath)

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.