ASP AttributesPropiedad
Manual de referencia completo del objeto File
La propiedad Attributes se utiliza para establecer o devolver los atributos de un archivo o carpeta especificados.
Sintaxis
FileObject.Attributes[=newattributes]
FolderObject.Attributes[=newattributes]
FolderObject.Attributes[=newattributes]
| Parámetros | Descripción |
|---|---|
| newattributes | Opcional. Especifica el valor de atributo del archivo o carpeta. Puede tomar uno de los siguientes valores o una combinación de ellos: 0 = Archivo normal. |
Ejemplo para el objeto File
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("The attributes of the file are: ")
Response.Write(f.Attributes)
set f=nothing
set fs=nothing
%>
Salida:
The attributes of the file are: 32
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("The attributes of the file are: ")
Response.Write(f.Attributes)
set f=nothing
set fs=nothing
%>
Salida:
The attributes of the file are: 32
Ejemplo para el objeto Folder
<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("The attributes of the folder are: ")
Response.Write(fo.Attributes)
set fo=nothing
set fs=nothing
%>
Salida:
The attributes of the folder are: 16
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("The attributes of the folder are: ")
Response.Write(fo.Attributes)
set fo=nothing
set fs=nothing
%>
Salida:
The attributes of the folder are: 16
Manual de referencia completo del objeto File Otras extensiones