2770Searching Drives, Viewing and Downloading Fileshttp://www.asp101.com/articles/jason/fileops/default.aspThis article illustrates some great uses of the File System Object. It shows how to choose a drive to search, and then builds a listbox of all the folders on that drive. Choose a folder and it builds a listbox of all the files in that folder. Choose a File and it will display it in the browser or prompt you to save the file to your hard drive.ASP > Tips and Tutorials > File ManipulationOct 10, 2006
As you probably know, Microsoft has one free DLL, namely CPSHOST.DLL, with which you can upload files. It requires a folder with write permissions since it is there where the file(s) will be posted (saved) when they arrive to the Web server (IIS). Another drawback is that you are focusing only on file uploading and not on other uploading possibilities. Remember, when you upload a file, you can also upload (post) any other inputs, such as the input file, input checkbox, input password, and input image, etc. And you can check their value just as if you were posting an ordinary form.
So when you upload a file you are really posting a form's content to the browser by using a different encoding type (enctype) in your form. That encoding is specified as enctype="multipart/form-data" as an attribute of your form.
The specification in RFC 1867 "Form-based File Upload in HTML" describes the mechanism by which a file may be uploaded from a Web browser to the server.
I built the ASP File Manager so that I could quickly gain access to web applications that I maintain on remote servers. It is a strictly web-based administration system that allows me to create, edit and delete text-based files, manage folders, and query and update databases. There are several other pieces that I use to check for installed components on the server and view all of the collection. s contents.
When I started building the scripts, I knew that I wouldn. t be satisfied if the finished application didn. t meet the following requirements:
Following active server pages code delete a file. Example uses FileSystem object to delete the file. Do not forget to double check permissions for this operation.
The File Access Component of ASP allows you to manipulate files on your server using ASP code. The first thing you should understand is what objects are available, and what their properties are. They are Drive, File, FileSystem, and Folder. There is also a Drives collection, a Files collection, and a Folders collection. Finally, the Textstream object is useful for moving data to and from files. Current specs for these objects are available from Microsoft's web site; you can click here to see a pop-up window with a relatively complete listing of the objects and their properties and methods.
ASP does not allow you to use IO system to modify on files and folders. But with the help of FileSystem object you can delete any file on your server. Do not forget to double check permissions for this operation.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.