(转自qtp帮助)vbs文件操作

上一篇 / 下一篇  2012-08-20 23:23:20 / 个人分类:qtp

 

零零碎碎的学习vbs文件操作一段时间了,今天可以做个总结了。所有内容可以直接在帮助文档中搜索FileSystemObject methods 获得,内容很简单,很常用

FileSystemObject Methods

In This Section

AddMethod(Dictionary)
Adds a key and item pair to aDictionaryobject.
AddMethod(Folders)
Adds a new folder to aFolderscollection.
BuildPathMethod
Appends a name to an existing path.
CloseMethod
Closes an openTextStreamfile.
CopyMethod
Copies a specified file or folder from one location to another.
CopyFileMethod
Copies one or more files from one location to another.
CopyFolderMethod
Recursively copies a folder from one location to another.
CreateFolderMethod
Creates a folder.
CreateTextFileMethod
Creates a specified file name and returns aTextStreamobject that can be used to read from or write to the file.
DeleteMethod
Deletes a specified file or folder.
DeleteFileMethod
Deletes a specified file.
DeleteFolderMethod
Deletes a specified folder and its contents.
DrivesExistsMethod
Returns true if the specified drive exists; false if it does not.
ExistsMethod
Returns true if a specified key exists in theDictionaryobject, false if it does not.
FileExistsMethod
Returns true if a specified file exists; false if it does not.
FolderExistsMethod
Returns true if a specified folder exists; false if it does not.
GetAbsolutePathNameMethod
Returns a complete and unambiguous path from a provided path specification.
GetBaseNameMethod
Returns a string containing the base name of the last component, less any file extension, in a path.
GetDriveMethod
Returns aDriveobject corresponding to the drive in a specified path.
GetDriveNameMethod
Returns a string containing the name of the drive for a specified path.
GetExtensionNameMethod
Returns a string containing the extension name for the last component in a path.
GetFileMethod
Returns aFileobject corresponding to the file in a specified path.
GetFileNameMethod
Returns the last component of specified path that is not part of the drive specification.
GetFileVersionMethod
Returns the version number of a specified file.
GetFolderMethod
Returns aFolderobject corresponding to the folder in a specified path.
GetParentFolderNameMethod
Returns a string containing the name of the parent folder of the last component in a specified path.
GetSpecialFolderMethod
Returns the special folder object specified.
GetTempNameMethod
Returns a randomly generated temporary file or folder name that is useful for performing operations that require a temporary file or folder.
ItemsMethod
Returns an array containing all the items in aDictionaryobject.
KeysMethod
Returns an array containing all existing keys in aDictionaryobject.
MoveMethod
Moves a specified file or folder from one location to another.
MoveFileMethod
Moves one or more files from one location to another.
MoveFolderMethod
Moves one or more folders from one location to another.
OpenAsTextStreamMethod
Opens a specified file and returns aTextStreamobject that can be used to read from, write to, or append to the file.
OpenTextFileMethod
Opens a specified file and returns aTextStreamobject that can be used to read from, write to, or append to the file.
ReadMethod
Reads a specified number of characters from aTextStreamfile and returns the resulting string.
ReadAllMethod
Reads an entireTextStreamfile and returns the resulting string.
ReadLineMethod
Reads an entire line (up to, but not including, the newline character) from aTextStreamfile and returns the resulting string.
RemoveMethod
Removes a key, item pair from aDictionaryobject.
RemoveAllMethod
Removes all key, item pairs from aDictionaryobject.
SkipMethod
Skips a specified number of characters when reading aTextStreamfile.
SkipLine
Skips the next line when reading aTextStreamfile.
WriteMethod
Writes a specified string to aTextStreamfile.
WriteBlankLinesMethod
Writes a specified number of newline characters to aTextStreamfile.
WriteLineMethod
Writes a specified string and newline character to aTextStreamfile.

TAG:

 

评分:0

我来说两句

Open Toolbar