|
The FileSystemObject provides access to a computer's file system.
Appends a name to an existing path. | |
Copies one or more files from one location to another. | |
Copies one or more folders and their contents from one location to another. | |
Creates a folder | |
Creates a text file with a specified name and returns a TextStream object. | |
Deletes a specified file. | |
Deletes a specified folder and its contents. | |
Returns a Boolean value indicating the existence of a drive. | |
Returns a Boolean value indicating the existence of a file. | |
Returns a Boolean value indicating the existence of a folder. | |
Returns a complete and unambiguous path from a provided path specification. | |
Returns a string containing the base name of the last component, less any extension, in a path. | |
Returns a Drive object corresponding to the drive in a specified path. | |
Returns a string containing the name of a drive for a specified path. | |
Returns a string containing the extension name for the last component in a path. | |
Returns a File object corresponding to the file in a specified path. | |
Returns the last component of the specified path that is not part of the drive specification. | |
Returns a Folder object corresponding to the folder in a specified path. | |
Returns a string containing the name of the parent folder of the last component in a specified path. | |
Returns the special folder specified. | |
Returns a randomly generated temporary file or folder name. | |
Moves one or more files from one location to another. | |
Moves one or more folders and their contents from one location to another. | |
Opens a specified file and returns a TextStream object. |
A collection of all Drive objects available on the local machine. See the Drives collection section. |
Note
Collections returned by FileSystemObject method calls reflect the state of the file system when the collection was created. Changes to the file system after creation are not reflected in the collection. If the file system might be changed during the lifetime of the collection object, the method returning the collection should be called again to ensure that the contents are current.
The following code illustrates how the FileSystemObject is used to return a TextStream object that can be read from or written to:
var fs = new ActiveXObject("Scripting.FileSystemObject");
var a = fs.CreateTextFile("c:\testfile.txt", true);
a.WriteLine("This is a test.");
a.Close();
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.