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. |
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 2001 Sun Microsystems, Inc. All rights reserved. Legal Notice.