GetAttr Function
λ³Όλ₯¨ λλ λλ ν 리μ μ΄λ¦μ΄λ νμΌ νμμ μλ³νλ λΉνΈ ν¨ν΄μ ꡬν©λλ€.
ꡬ문:
GetAttr (Text As String)
λ°ν κ°:
Integer
λ§€κ° λ³μ:
Text: λͺ νν νμΌ μ§μ μ ν¬ν¨νλ μμμ λ¬Έμμ΄ μμ λλ€. URL νκΈ°λ²μ μ¬μ©ν μλ μμ΅λλ€.
μ΄ ν¨μλ μ§μ ν νμΌμ μμ±μ νμΈνμ¬ λ€μμ νμΌ μμ±μ μλ³ν μ μκ² νλ λΉνΈ ν¨ν΄μ ꡬν©λλ€.
κ°
Named constant |
Value |
Definition |
ATTR_NORMAL |
0 |
Normal files. |
ATTR_READONLY |
1 |
Read-only files. |
ATTR_HIDDEN |
2 |
Hidden file |
ATTR_SYSTEM |
4 |
System file |
ATTR_VOLUME |
8 |
Returns the name of the volume |
ATTR_DIRECTORY |
16 |
Returns the name of the directory only. |
ATTR_ARCHIVE |
32 |
File was changed since last backup (Archive bit). |
μμ± λ°μ΄νΈμ λΉνΈκ° μ€μ λμλμ§ νμΈνλ €λ©΄ λ€μμ 쿼리 λ©μλλ₯Ό μ¬μ©ν©λλ€.
μ:
Sub ExampleSetGetAttr
On Error Goto ErrorHandler REM Define target for error-handler
If Dir("C:\test",16)="" Then MkDir "C:\test"
If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"
SetAttr "c:\test\autoexec.sav" ,0
FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"
SetAttr "c:\test\autoexec.sav" ,1
Print GetAttr( "c:\test\autoexec.sav" )
End
ErrorHandler:
Print Error
End
End Sub