Tweet
A year ago (more or less) I wrote a series of posts about Scripting.FileSystemObject. If we use all the information gathered in those articles, we can create some sort of file explorer interface for our web site. The upload and management of files could be important, for example, in a company intranet, however, it is mandatory to follow a security policy in doing that, otherwise we end up with users messing up with files saved on our server.
Today we are going to create a simple ASP function that will check authorizations of folders. The function will try to create and delete a dummy txt file. The result of that operation will tell us if the folder has writing and reading permission or not.
Ready?
Showing posts with label FileExists. Show all posts
Showing posts with label FileExists. Show all posts
Monday, 17 October 2011
Monday, 4 October 2010
ASP: Scripting.FileSystemObject... how to read file or folder information
Tweet
As promised I would like to explain other useful methods related to the Scripting.FileSystemObject. Infact you can obtain information on a file by simply calling different methods. As I wrote a few days ago in the "ASP: Scripting.FileSystemObject... how to move, copy and delete a file or a folder" post, just start by setting the object:
As promised I would like to explain other useful methods related to the Scripting.FileSystemObject. Infact you can obtain information on a file by simply calling different methods. As I wrote a few days ago in the "ASP: Scripting.FileSystemObject... how to move, copy and delete a file or a folder" post, just start by setting the object:
<%
Dim FSO
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
and the target file:
Dim varfile
Dim filepath
Dim fileinfo
filepath = yourfilepath
varfile = Server.MapPath(filepath)
Subscribe to:
Posts (Atom)