You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
590 B
27 lines
590 B
|
|
Include "config.vbs"
|
|
|
|
Sub Include(sInstFile)
|
|
Dim oFSO, f, s
|
|
Set oFSO = CreateObject("Scripting.FileSystemObject")
|
|
Set f = oFSO.OpenTextFile(sInstFile)
|
|
s = f.ReadAll
|
|
f.Close
|
|
ExecuteGlobal s
|
|
End Sub
|
|
|
|
Function CopyDir()
|
|
|
|
Set WshShell = CreateObject("WScript.Shell")
|
|
|
|
cmd = rsync + " -e '"+ssh+" -i "+key_pri+"' -chavzP --stats -r --delete --exclude={"+ExcludePath+"} --chmod=Du+rwx,Dgo+rwx,Fu+rwx,Fgo+rwx "
|
|
cmd = cmd + LocalPath+" "+User+"@"+Ip+":"+RemotePath
|
|
|
|
CopyDir = WshShell.Run(cmd, 9, true)
|
|
|
|
End Function
|
|
|
|
|
|
ret = CopyDir()
|
|
|
|
WScript.Echo(ret)
|
|
|