fso.GetFolder( folderPath );
As shown in the above syntax of FSO GetFolder method it accepts only 1 parameter as folderPath. GetFolder method returns the folder object along with its properties and methods that targets on the folder name specified at the end of folderPath string value.
Example of FSO GetFolder Method
FSO Folder Object Properties
- Attributes: gets or sets the attributes of the folder.
- DateCreated: returns the date and time when the folder was created.
- DateLastAccessed: returns the date and time when the folder was last accessed.
- DateLastModified: returns the date and time when the folder was last modified.
- Drive: returns the drive letter retrieved from the path of the folder.
- IsRootFolder: returns the Boolean value i.e. true or false that indicates whether the folder is root folder or not.
- Name: returns the name of the folder.
- ParentFolder: returns the name of the parent folder.
- Path: returns the complete path of the folder.
- ShortName: returns the short name of the folder according to 8.3 naming convention of file system.
- ShortPath: returns the short path of the folder according to 8.3 naming convention of file system.
- Size: returns the size of the folder in bytes.
- Type: returns the type of the folder.
FSO Folder Object Collections
- Files: returns the collection of files stored in the folder.
- SubFolders: returns the collection of subfolders stored inside the folder.
FSO Folder Object Methods
- Copy: copies the folder to the specified location.
- Delete: deletes the folder.
- Move: moves the folder to the specified location.
- CreateTextFile: creates a text file inside the folder and returns the textstream