SetAttr Statement:

The SetAttr statement sets the attributes of a file or folder. There are two required arguments, pathname and attributes. Path name must be the absolute path to a folder or file. The attributes argument is an integer representing one of the following constants:
Constant Value
vbNormal 0
vbReadOnly 1
vbHidden 2
vbSystem 4
vbArchive 32
You must explicitly declare these constants in your code.

Syntax:
SetAttr pathname, attributes
Example Usage:
Makes the directory New Folder on the C drive's root hidden.

<% SetAttr "C:\New Folder", 2 %>

Makes the directory New Folder on the server's root hidden.

<%
Const vbHidden = 2
SetAttr server.mappath("/New Folder"), vbHidden
%>
ASP Source Code:
<%
Private Sub SetAttr(byVal pathname, byVal attributes)
	Dim objFSO, objFile, objFolder, boolErr, strErrDesc
	On Error Resume Next
	Set objFSO = Server.CreateObject("scripting.filesystemobject")
	if instr( right( pathname, 4 ), "." ) then
		 ' probably a file
		Set objFile = objFSO.GetFile(pathname)
		objFile.Attributes = attributes
		Set objFile = Nothing
	else
		 ' probably a directory or folder
		Set objFolder = objFSO.GetFolder(pathname)
		objFolder.Attributes = attributes
		Set objFolder = Nothing
	end if
	if Err Then 
		boolErr = True
		strErrDesc = Err.Description
	end if
	Set objFSO = Nothing
	On Error GoTo 0
	if boolErr then Err.Raise 5103, "SetAttr Statement", strErrDesc
End Sub
%>