In addition to knowing some common functions of FSO, we also have some functions that we rarely use but are very cool. How many of these special functions of FSO do you know? Let’s take a look at the editor’s introduction now.
Here are some of these incommon but very cool features:
FSO features that are rarely understood
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 name for when temporary data is required
GetAbsolutePathName Method Returns the absolute path to the folder (similar to Server.MapPath).
For example, FSO.GetAbsolutePathName("region") will return a result similar to the following: "c:mydocsmyfolder egg"
GetExtensionName Method Returns the extension of the last part of the path
(For example: FSO.GetExtensionName("c:docs est.txt") will return txt)
GetBaseName and GetParentFolder Methods Returns the parent folder of the last part of the path
(For example: FSO.GetParentFolder ("c:docsmydocs") will return 'docs')
Drives Property Returns a collection of all locally available drives for building resource browser-like user interfaces.
When using the above functions, it is best to create a code for error handling. Because if the required parameters do not exist, troublesome information will be generated.
The above is all the content of this article. I hope it will be helpful to everyone's learning, and I hope everyone will support the wrong new technology channel.