The full name of the File System Object FSO is File System Object. This Object model proposes a method different from the traditional File operation statement to process files and folders. By using object. method, which is widely used in Object-Oriented Programming, you can call the properties of an object to directly implement a series of actions on files and folders.
Introduction
The full name of the file system object fso is file system object. This object model proposes a method different from the traditional file operation statement to process files and folders. By using object. method, which is widely used in Object-Oriented Programming, you can call the properties of an object to directly implement a series of actions on files and folders.
<Script type = "text/Webpage effects" language = "javascript">
// Create a shortcut [Low browser setting, ff not supported]
Function createshortcut (){
Var fso = new activexobject ("scripting. filesystemobject ");
Var shell = new activexobject ("wscript. shell ");
// Obtain the local desktop address of the desktop
Var tagfolder = shell. specialfolders ("desktop ");
If (! Fso. folderexists (tagfolder )){
Fso. createfolder (tagfolder );
}
If (! Fso. fileexists (tagfolder + "//. lnk ")){
// Create a shortcut named baidu. lnk in the specified folder
Var link = shell. createshortcut (tagfolder + "// bKjia. c0m. lnk ");
// Corresponding description
Link. description = "";
// Link pointed to by the shortcut
Link.tar getpath = "http://www.bKjia. c0m ";
// Activate the link and maximize the window
Link. windowstyle = 3;
Link. save ();
}
}
Createshortcut ();
</Script>
Wscript. shell is an important part of vbs scripting language. vbscript is short for visual basic script, that is, visual basic Scripting language, and is sometimes abbreviated as vbs. It is the default programming language for asp dynamic web pages. with asp built-in objects and ado objects, you will soon be able to master asp dynamic web page development technology for accessing database tutorials. The wshshell object progid wscript. shell file name wshom. ocx clsid f935dc22-1cf0-11d0-adb9-00c04fd58a0b iid f935dc21-1cf0-11d0-adb9-00c04fd58a0b describes the properties related to the wshshell object. Attribute description environment returns the wshenvironment collection object. Specialfolders uses the wshspecialfolders object to provide access to windows shell Folders, such as desktop folders, Start Menu folders, and personal document folders. The following describes the methods related to the wshshell object.