SetAttr Statement

Faayiilii ibsameef amaloota odeeffannoo moggaasi.

caasimaa:


SetAttr FileName As String, Attribute As Integer

Ulaagaalee:

FileName: maqaa faayilii, xurree dabalatee amaloota yaalii barbaadde. Yoo xuurree galchuu baattee, SetAttr Faayiilii galeeloo ammaa irraa jiru barbaadi.kanas fayyadamuu ni dandeessa Sirnasxaa URL .

Amaloota : Haala biitii hiika amalootaa barbaaddee itti moggaastu ykn haqxuf gargaaru.

Gatii

Named constant

Value

Definition

ATTR_NORMAL

0

Normal files.

ATTR_READONLY

1

Read-only files.

ATTR_HIDDEN

2

Hidden file


Amaloota baay'ee gatii walduraa duubaan dhufan yaayaa ykn hima waliin moggaasuu dandeessa.

Error codes:

5 Ejjatoo fashalaan waamu

53 Faayilii hin argamne 53 Faayilii hin argamne 53 Faayilii hin argamne 53 Faayilii hin argamne 53 Faayilii hin argamne 53 Faayilii hin argamne

70 heeyyamni didameera

Fakkeenya:


Sub ExampleSetGetAttr
 On Error Goto ErrorHandler REM qiyaaffannoo  error-handler dhaaf hiiki.
 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" , ATTR_READONLY
 Print GetAttr( "c:\test\autoexec.sav" )
 End
ErrorHandler:
 Print Error
 End
End Sub

Please support us!