Class Folder (Scripting VBA)
Provides access to all the properties of a folder.
The classes Drive, File and FileSystemObject. give access to class Folder
Methods
Copy - Copies a specified file or folder from one location to another.
Delete - Deletes a specified file or folder.
CreateTextFile - Creates a specified file name and returns a TextStream object that can be used to read from or write to the file.
Move - Moves a specified file or folder from one location to another.
Properties
Path (Default member) - Returns the path for a specified file, folder, or drive.
Attributes sets or returns the attributes of files or folders. Read/write or read-only, depending on the attribute.
DateCreated returns the date and time that the specified file or folder was created.
DateLastAccessed returns the date and time that the specified file or folder was last accessed.
DateLastModified returns the date and time that the specified file or folder was last modified.
Drive returns the drive letter of the drive on which the specified file or folder resides.
Files returns a Files collection consisting of all File objects contained in the specified folder, including those with hidden and system file attributes set.
IsRootFolder returns True if the specified folder is the root folder; False if it is not.
Name sets or returns the name of a specified file or folder.
ParentFolder returns the folder object for the parent of the specified file or folder.
ShortName returns the short name used by programs that require the earlier 8.3 naming convention.
ShortPath returns the short path used by programs that require the earlier 8.3 file naming convention.
Size for files, returns the size, in bytes, of the specified file. For folders, returns the size, in bytes, of all files and subfolders contained in the folder.
SubFolders returns a Folders collection consisting of all folders contained in a specified folder, including those with Hidden and System file attributes set.
Type returns information about the type of a file or folder. For example, for files ending in .TXT, "Text Document" is returned.
Related Classes
Drive - Provides access to the properties of a particular disk drive or network share.
Files - Collection of all File objects within a folder.
Folders - Collection of all Folder objects contained within a Folder object.
TextStream - Facilitates sequential access to file.