WSH@Workshop 
HOME > WSHリファレンス > File オブジェクト > Move

Move (File オブジェクト)

object.Move path

引数

object
File オブジェクトの名前を指定します。
path
移動先のファイル

解説

ファイルを移動します。
ドライブ名から「\」までを指定した場合、指定ファイルのサブファイルに移動されます。

使用例

Set objFso = CreateObject("Scripting.FileSystemObject")

Set objFile = objFso.GetFile("c:\test1.txt")

objFile.Move "c:\test2.txt"

関連項目

CopyDeleteOpenAsTextStreamAttributesDateCreatedDateLastAccessedDateLastModifiedDrive
NameParentFolderPathShortNameShortPathSizeType



WSHリファレンス

FileSystemObject オブジェクト
Drive オブジェクト
Folder オブジェクト
File オブジェクト
Drives コレクション
Folders コレクション
Files コレクション


Copyright (C) 2006-2008 WSH@Workshop All rights reserved.