Sideway
output.to from Sideway
Draft for Information Only

Content

VBScript Methods of FSO Object
 GetAbsolutePathName Method
  Syntax
  Argument
  Remark
  Applied to
 GetBaseName Method
  Syntax
  Argument
  Remark
  Applied to
 GetDrive Method
  Syntax
  Argument
  Remark
  Applied to
 GetDriveName Method
  Syntax
  Argument
  Remark
  Applied to
 GetExtensionName Method
  Syntax
  Argument
  Remark
  Applied to
 GetFile Method
  Syntax
  Argument
  Remark
  Applied to
 GetFileVersion Method
  Syntax
  Argument
  Remark
  Applied to
 GetFileName Method
  Syntax
  Argument
  Remark
  Applied to
 GetFolder Method
  Syntax
  Argument
  Remark
  Applied to
 GetParentFolderName Method
  Syntax
  Argument
  Remark
  Applied to
 GetSpecialFolder Method
  Syntax
  Argument
  Setting
  Applied to
 GetStandardStream Method
  Syntax
  Argument
  Setting
  Applied to
 GetTempName Method
  Syntax
  Argument
  Remark
  Applied to

VBScript Methods of FSO Object

Some typical predefined Elements are.

  • FSO Object:
    • BuildPath Method
    • CopyFile Method
    • CopyFolder Method
    • CreateFolder Method ≡ Folder Object
    • CreateTextFile Method
    • DeleteFile Method
    • DeleteFolder Method
    • DriveExists Method
    • FileExists Method
    • FolderExists Method
    • GetAbsolutePathName Method
    • GetBaseName Method
    • GetDrive Method ≡ Drive Object
    • GetDriveName Method
    • GetExtensionName Method
    • GetFile Method ≡ File Object
    • GetFileVersion Method
    • GetFileName Method
    • GetFolder Method ≡ Folder object
    • GetParentFolderName Method
    • GetSpecialFolder Method ≡ Folder object
    • GetStandardStream Method ≡ TextStream object
    • GetTempName Method
    • MoveFile Method
    • MoveFolder Method
    • OpenTextFile Method

GetAbsolutePathName Method

last updated 14 Dec 2017

is to return a complete and unambiguous absolute path name from given pathspec path.

Syntax

fsoobjvar.GetAbsolutePathName(pathspec)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetAbsolutePathNameRequired Keyword. to specify the Method of associated Object.folderspecRequired. Path specification to change to a complete and unambiguous path.

Remark

  • A path is complete and unambiguous if it provides a complete reference from the root of the specified drive. A complete path can only end with a path separator character (\) if it specifies the root folder of a mapped drive.
  • Assuming the current directory is c:\mydocuments\reports, the following table illustrates the behavior of the GetAbsolutePathName method.

    CompareMode Setting

    pathspec (VBScript)pathspec (JScript)Returned path"c:""c:""c:\mydocuments\reports""c:..""c:..""c:\mydocuments""c:\""c:\\""c:\""c:*.*\may97""c:*.*\\may97""c:\mydocuments\reports\*.*\may97""region1""region1""c:\mydocuments\reports\region1""c:\..\..\mydocuments""c:\\..\\..\\mydocuments""c:\mydocuments"

Applied to

FileSystemObject Object

GetBaseName Method

last updated 14 Dec 2017

is to return a string containing the base name of the last component, less any file extension, in given path.

Syntax

fsoobjvar.GetBaseName(path)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetBaseNameRequired Keyword. to specify the Method of associated Object.pathRequired. The path specification for the component whose base name is to be returned.

Remark

  • The GetBaseName method returns a zero-length string ("") if no component matches the path argument.
  • The GetBaseName method works only on the provided path string. It does not attempt to resolve the path, nor does it check for the existence of the specified path.

Applied to

FileSystemObject Object

GetDrive Method

last updated 14 Dec 2017

is to return a Drive object according to the drive component of the given drivespec.

Syntax

fsoobjvar.GetDrive ( drivespec )

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetDriveRequired Keyword. to specify the Method of associated Object.drivespecRequired. The drivespec argument can be a drive letter (c), a drive letter with a colon appended (c

Remark

  • For network shares, a check is made to ensure that the share exists.
  • An error occurs if drivespec does not conform to one of the accepted forms or does not exist.
  • To call the GetDrive method on a normal path string, use the following sequence to get a string that is suitable for use as drivespec:
    DriveSpec = GetDriveName(GetAbsolutePathName(Path))

Applied to

FileSystemObject Object

GetDriveName Method

last updated 14 Dec 2017

is to return a string containing the drive name of drive component of the given path.

Syntax

fsoobjvar.GetDriveName(path)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetDriveNameRequired Keyword. to specify the Method of associated Object.pathRequired. The path specification for the component whose drive name is to be returned.

Remark

  • The GetDriveName method returns a zero-length string ("") if the drive can't be determined.
  • The GetDriveName method works only on the provided path string. It does not attempt to resolve the path, nor does it check for the existence of the specified path.

Applied to

FileSystemObject Object

GetExtensionName Method

last updated 14 Dec 2017

is to return the file extension of the last file component of the given path

Syntax

fsoobjvar.GetExtensionName(path)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetExtensionNameRequired Keyword. to specify the Method of associated Object.pathRequired. The path of the component whose extension is to be returned.

Remark

  • For network drives, the root directory (\) is considered to be a component.
  • This method returns an empty string ("") if the file doe not exist.

Applied to

FileSystemObject Object

GetFile Method

last updated 14 Dec 2017

is to return a File Object according to the file of given filespec path.

Syntax

fsoobjvar.GetFile(filespec)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetFileRequired Keyword. to specify the Method of associated Object.filespecRequired. The filespec is the path (absolute or relative) to a specific file.

Remark

  • An error occurs if the specified file does not exist.
  • The GetFile method does not support the use of wildcard characters, such as ? or *.

Applied to

FileSystemObject Object

GetFileVersion Method

last updated 14 Dec 2017

is to return the version number of a file component according to the last component of given pathspec path.

Syntax

fsoobjvar.GetFileVersion(pathspec)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetFileVersionRequired Keyword. to specify the Method of associated Object.pathspecRequired. The path (absolute or relative) to a specific file.

Remark

  • The GetFileVersion method returns a zero-length string ("") if pathspec does not end with the named component.
  • The GetFileVersion method works only on the provided path string. It does not attempt to resolve the path, nor does it check for the existence of the specified path.

Applied to

FileSystemObject Object

GetFileName Method

last updated 14 Dec 2017

is to return the file namer of a file component according to the last component of given pathspec path.

Syntax

fsoobjvar.GetFileName(pathspec)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetFileNameRequired Keyword. to specify the Method of associated Object.pathspecRequired. The path (absolute or relative) to a specific file.

Remark

  • The GetFileName method returns a zero-length string ("") if pathspec does not end with a file name.
  • The GetFileName method works only on the provided path string. It does not attempt to resolve the path, nor does it check for the existence of the specified path.

Applied to

FileSystemObject Object

GetFolder Method

last updated 14 Dec 2017

is to return a Folder object according to the given folderspec path.

Syntax

fsoobjvar.GetFolder(folderspec)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetFolderRequired Keyword. to specify the Method of associated Object.folderspecRequired. The folderspec is the path (absolute or relative) to a specific folder.

Remark

  • An error occurs if the specified folder does not exist.

Applied to

FileSystemObject Object

GetParentFolderName Method

last updated 14 Dec 2017

is to return a string containing the name of the parent folder of the last component in a given path.

Syntax

fsoobjvar.GetParentFolderName(path)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetParentFolderNameRequired Keyword. to specify the Method of associated Object.pathRequired. The path specification for the component whose parent folder name is to be returned.

Remark

  • The GetParentFolderName method returns the full path up to and including the name of the parent folder.
  • The GetParentFolderName method returns a zero-length string ("") if there is no parent folder for the component specified in the path argument.
  • The GetParentFolderName method works only on the provided path string. It does not attempt to resolve the path, nor does it check for the existence of the specified path.

Applied to

FileSystemObject Object

GetSpecialFolder Method

last updated 14 Dec 2017

is to return a special Folder Object according to the given folderspec.

Syntax

fsoobjvar.GetSpecialFolder(folderspec)

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetSpecialFolderRequired Keyword. to specify the Method of associated Object.folderspecRequired Setting. The name of the special folder to be returned. Can be any of the constants shown in the Settings section.

Setting

folderspec argument:

ConstantValueDescriptionWindowsFolder0The Windows folder contains files installed by the Windows operating system.SystemFolder1The System folder contains libraries, fonts, and device drivers.TemporaryFolder2The Temp folder is used to store temporary files. Its path is found in the TMP environment variable.

Applied to

FileSystemObject Object

GetStandardStream Method

last updated 14 Dec 2017

is to return a standard TextStream Object according to the given standardStreamType setting and specified optional unicode setting.

Syntax

fsoobjvar.GetStandardStream(standardStreamType [, unicode ])

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetStandardStreamRequired Keyword. to specify the Method of associated Object.standardStreamTypeRequired. Can be one of three constantsunicodeOptional. Boolean value that indicates whether the file is created as a Unicode or ASCII file. The value is true if the file is created as a Unicode file, false if it is created as an ASCII file. If omitted, an ASCII file is assumed.

Setting

standardStreamType argument:

ConstantValueDescriptionStdIn0Returns a TextStream object corresponding to the standard input stream.StdOut1Returns a TextStream object corresponding to the standard output stream.StdErr2Returns a TextStream object corresponding to the standard error stream.

Applied to

FileSystemObject Object

GetTempName Method

last updated 14 Dec 2017

is to generate and return a randomly generated temporary file or folder name for performing operations that require a temporary file or folder.

Syntax

fsoobjvar.GetTempName ( )

Argument

fsoobjvarRequired. to specify the associated Object instance reference.GetTempNameRequired Keyword. to specify the Method of associated Object.

Remark

  • The optional object is always the name of a FileSystemObject.
  • The GetTempName method does not create a file. It provides only a temporary file name that can be used with CreateTextFile to create a file.

Applied to

FileSystemObject Object

©sideway

ID: 180500024 Last Updated: 5/24/2018 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019