2786File Access Tutorialhttp://www.aspalliance.com/stevesmith/articles/filetutorial.aspThe 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 > Tips and Tutorials > File ManipulationOct 10, 2006
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.
This article is number three in a series of articles I wrote about uploading and displaying binary data with ASP. The first article was about Uploading binary data to the database, second was on Displaying binary data from the database and the third one ( this one ) is going to be on 'Uploading files to the server hard disk using pure ASP'.
This example code demonstrates how to link and display text files within a single document in ASP. Using the title of the text files as hyperlinks, when clicked the file name, the full contents of the document will be displayed. Very useful for making copybooks and file layouts available online.
Firstly, it demonstrates the use of the FileSystemObject, and secondly it shows how powerful regular expressions can be. I learnt all I know about regular expressions from Microsoft's online documentation and a lot of experimentation!
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.
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.