April 2004
Beginner
416 pages
11h 3m
English
Although the approach to file management just discussed might seem laid back and groovy, in many environments, you need to take a more existential approach. In other words, you must first determine whether the file exists, and if it does, you want to append to the file (not overwrite it); if it does not exist, you want to create it. This ensures that your log file is present on each server running your script.
To check for the existence of a particular file, you use the FileExists method of FileSystemObject. Although it’s true that this method complicates the script a little, it’s also true that by checking for and creating a particular file as required, you add an order of magnitude to the flexibility of the script. ...