tbaror Posted June 6, 2008 Share Posted June 6, 2008 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 More sharing options...
rasim Posted June 6, 2008 Share Posted June 6, 2008 Works fine for me: MsgBox(0, "", DirCopy("d:\BIN", "\\ws1\c$\BIN")) Check a path correctness. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now