源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

VBS教程:方法-Move 方法

  • 时间:2022-12-30 04:45 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:VBS教程:方法-Move 方法

Move 方法

将指定的文件或文件夹从某位置移动到另一位置。 [code][i]object.[/i][b]Move[/b] [i]destination [/i][/code] [h3]参数[/h3]object 必选项。应为 [b]File[/b] 或 [b]Folder[/b] 对象的名称。 destination 必选项。目标位置。表示要将文件或文件夹移动到该位置。不允许使用通配符。 [h3]说明[/h3]对 File 或 Folder 应用 Move 方法的结果与使用 FileSystemObject.MoveFile 或 FileSystemObject.MoveFolder 执行的操作完全相同。然而,要注意的是 FileSystemObject.MoveFile 或 FileSystemObject.MoveFolder 方法可移动多个文件或文件夹。 下面例子举例说明如何使用 [b]Move[/b] 方法:
[code]Dim fso, MyFileSet fso = CreateObject("Scripting.FileSystemObject")Set MyFile = fso.CreateTextFile("c:\testfile.txt", True)MyFile.WriteLine([/code]“这是一个测试。”[code])[/code][code]MyFile.Close[/code][code]Set MyFile = fso.GetFile("c:\testfile.txt")[/code][code][b]MyFile.Move[/b] "c:\windows\desktop\"[/code]
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部