In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use FileSystem Object". Friends who are interested might as well take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use FileSystem Object.
Tip: when I first saw this function, I was deceived into thinking that I could really create a file on the visitor's hard drive through the browser, because I started to try it. I don't believe you can COPY the following code into a HTML file and run it again!
Did you find that the Autoexec.bat file of your C disk is missing? He he
In fact, when that file is running, IE will remind you that the ActiveX control you are currently using is not safe and ask if you are running it, but since you are as eager as I am to see how it works, you will not hesitate to press [OK]. In fact, this is achieved by using FileSystemObject, to understand more detailed usage and examples, click here to download the Chinese instructions of Jscript or buy this book can also take a look at the example of worry-free script arrangement, so that you can learn.
Let's first take a look at what properties and functions are available, and then we'll do some small examples for some functions.
Method or property description BuildPath () generates a file path CopyFile () copies a file CopyFolder () replicates a directory CreateFolder () creates a new directory CreateTextFile () generates a file DeleteFile () deletes a file DeleteFolder () deletes a directory DriveExists () verifies the existence of Drives return disk letter collection FileExists () verifies the existence of a file FolderExists verifies whether a directory exists GetAbsolutePathName () gets the absolute value of a file Get the file name for the path GetBaseName () get the disk name GetDriveName () get the disk name GetExtensionName () get the suffix GetFile () get the file object GetFileName () get the file name GetFolder () get the directory object GetParentFolderName get the parent directory name of the file or directory GetSpecialFolder () get the special directory name GetTempName () generate a temporary file object MoveFile () Mobile file MoveFolder () Mobile directory OpenTextFile () Open a file stream
Example illustration
BuildPath (path, file name) / / this method adds a file to the given path and automatically adds a delimiter
CopyFile (source file, target file, overwrite) / / copy the source file to the target file. If the overwrite value is true, the file will be overwritten if the target file exists
CopyFolder (object directory, target directory, overwrite) / / copy the object directory to the target directory. If the overwrite is true, the file will be overwritten if the target directory exists
CreateFolder (directory name) / / create a new directory
CreateTextFile (filename, overwrite) / / create a new file. If the file already exists, you need to set the override value to true
DeleteFile (file name, read-only?) / / Delete a file. If the attribute of the file is read-only, you need to set the read-only value to true. I believe you have a deeper understanding of "how to apply FileSystem Object". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.