Private Sub Form_Load()
Shell "cmd.exe /k net use \\192.168.27.106\K盘 1 /user:kkkkkk ", vbHide '连接远程服务器,"kkkkkk"为用户名,"1"为密码
End Sub
Private Sub Command1_Click() '上传文件夹所有内容
Set fs = CreateObject("Scripting.FileSystemObject") '创建声明
fs.CopyFolder "c:\yy", "\\192.168.27.106\K盘\yy", True
'fs.CopyFolder 源文件夹, 目标文件夹, True
End Sub
Private Sub Command2_Click() '下载文件夹所有内容
Set fs = CreateObject("Scripting.FileSystemObject") '创建声明
fs.CopyFolder "\\192.168.27.106\K盘\yy", "c:\yy", True
'fs.CopyFolder 源文件夹, 目标文件夹, True
End Sub