GetAttr Function

αžαŸ’αžšαž‘αž”αŸ‹β€‹αž›αŸ†αž“αžΆαŸ†αžαžΌαž…β€‹αŸ—β€‹β€‹αžŠαŸ‚αž›β€‹αž”αž‰αŸ’αž‡αžΆαž€αŸ‹β€‹αž”αŸ’αžšαžΆαž”αŸ‹β€‹αž’αŸ†αž–αžΈβ€‹αž”αŸ’αžšαž—αŸαž‘β€‹αž―αž€αžŸαžΆαžšβ€‹ αž¬β€‹αžˆαŸ’αž˜αŸ„αŸ‡β€‹αžšαž”αžŸαŸ‹β€‹αž—αžΆαž‚β€‹ αž¬β€‹αžαžΒ αŸ”

αžœαžΆαž€αŸ’αž™β€‹αžŸαž˜αŸ’αž–αž“αŸ’αž’ αŸ–


GetAttr (Text As String)

αžαž˜αŸ’αž›αŸƒβ€‹αžαŸ’αžšαž‘αž”αŸ‹ αŸ–

αž…αŸ†αž“αž½αž“β€‹αž‚αžαŸ‹

αž”αŸ‰αžΆαžšαŸ‰αžΆαž˜αŸ‰αŸ‚αžαŸ’αžš αŸ–

Text αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŽαžΆβ€‹αž˜αž½αž™ αžŠαŸ‚αž›β€‹αž˜αžΆαž“β€‹αžŸαŸαž…αž€αŸ’αžαžΈβ€‹αž”αž‰αŸ’αž‡αžΆαž€αŸ‹β€‹αž―αž€αžŸαžΆαžšβ€‹αž…αŸ’αž”αžΆαžŸαŸ‹β€‹αž›αžΆαžŸαŸ‹Β αŸ” αž’αŸ’αž“αž€β€‹αž€αŸβ€‹αž’αžΆαž…β€‹αž”αŸ’αžšαžΎβ€‹αž•αž„αžŠαŸ‚αžšβ€‹αž“αžΌαžœβ€‹ αž€αŸ†αžŽαžαŸ‹ URLΒ αŸ”

αž’αž“αž»αž‚αž˜αž“αŸβ€‹αž“αŸαŸ‡β€‹αž€αŸ†αžŽαžαŸ‹β€‹αž‚αž»αžŽβ€‹αž›αž€αŸ’αžαžŽαŸˆ αžŸαž˜αŸ’αžšαžΆαž”αŸ‹β€‹αž―αž€αžŸαžΆαžšβ€‹αžŠαŸ‚αž›β€‹αž”αžΆαž“β€‹αž”αž‰αŸ’αž‡αžΆαž€αŸ‹β€‹ αž“αž·αž„β€‹αžαŸ’αžšαž‘αž”αŸ‹β€‹αž›αŸ†αž“αžΆαŸ†β€‹αžαžΌαž…β€‹αŸ— αžŠαŸ‚αž›β€‹αž’αžΆαž…β€‹αž‡αž½αž™β€‹αž’αŸ’αž“αž€β€‹αžŠαžΎαž˜αŸ’αž”αžΈβ€‹αžŸαŸ’αž‚αžΆαž›αŸ‹β€‹αž‚αž»αžŽβ€‹αž›αž€αŸ’αžαžŽαŸˆβ€‹αžšαž”αžŸαŸ‹β€‹αž―αž€αžŸαžΆαžšβ€‹β€‹αžŠαžΌαž…β€‹αžαžΆαž„β€‹αž€αŸ’αžšαŸ„αž˜β€‹ αŸ–

Error codes:

5 αž€αžΆαžšβ€‹αž αŸ…β€‹αž”αŸ‚αž”αž”αž‘β€‹αž˜αž·αž“β€‹αžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœ

53 αžšαž€β€‹αž˜αž·αž“β€‹αžƒαžΎαž‰β€‹αž―αž€αžŸαžΆαžš

αžαž˜αŸ’αž›αŸƒ

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

Please support us!