|
QTP中映射驱动器和拷贝文件夹的脚本
映射驱动器:
Set WshNetwork = CreateObject("Wscrīpt.Network")
WshNetwork.MapNetworkDrive "z:","\\10.0.0.208\1","1","1"
删除驱动器:
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.RemoveNetworkDrive "Z:", "true","true"
拷贝文件夹:
Const ōverWriteFiles = True
Set ōbjFSO = CreateObject("scrīpting.FileSystemObject")
objFSO.CopyFolder "C:\pcnet" , "Z:\" ,OverWriteFiles
删除文件夹
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder("Z:\pcnet")
[ 本帖最后由 tomtang 于 2008-5-14 16:52 编辑 ] |
|