2001-11-9 CNEAGLE
Author: Gan Jiping
FSO does have some weaknesses - such as it is difficult to handle binary files, including Word documents, many graphic format files and other files. However, you can still operate these files in other ways - moving them, delete them, and so on. What you can't do is to open or write them.
Another limit is a problem with the length of the file. When you read some content immediately, all information is stored in memory - the more content, the greater the memory consumption. This will make each job slower. So, if you need to operate very large files, or a large amount of small files, consider dividing files into small pieces and often clear memory. Integrate the application into the COM object component, and greatly increase the speed of the program.
Similarly, you cannot use FSO to manage privileges, the properties of the file, folder, and perform a good way to perform secure encryption is to set the message book file mentioned earlier as read-only, set it to handle, then Modify it back. This method is often used in CGI and Perl, but unfortunate, there is no satisfactory method to achieve FSO.
What can I do with FSO?
There are still many great features in FSO, but many people have not realized. These features are often found after you feel that something is very difficult, then you often want to sigh: If I know this method!
The following is listed below these uncommon but very cool features:
Few Understanding FSO Functions GetSpecialFolder Method Returns the path to a specific Windows folder: Windows installation directory; Windows system directory; Windows Temporary Directory Fso.getspecialFolder ([0, 1, or 2]) getTemPName Method Returns a randomly generated file Or directory names for the need to store temporary data to return to the absolute path of the folder (similar to server.mappath). For example, fso.getabsolutePathname ("Region") will return to the following results: "c: mydocsmyfolder egion" getExtensionName Method returns the extension of the last part of the path (such as fso.getextensionname ("C: DOCS Est.txt") TXT) GetBaseName and getParentFolder Methods returns the parent folder of the last part of the path (such as: fso.getParentFolder ("C: DOCSMYDOCS") will return 'DOCS') DRIVES Property Returns a collection of all local available drives for establishing resources The user interface of the browser.
When using the above features, it is best to build the code for error processing. Because if the parameters needed do not exist, trouble information will be generated.
to sum up
As we have seen, FSO is very useful, here is only the horn of the iceberg. You can use FSO to build a powerful application, simply complete a number of tasks.