Set The File Attributes Of Any File

This Content Component encountered an error
This API call is used to set the file attributes of any file, e.g. Read Only,
Hidden, Normal, etc. To use this API, paste the following code into the
declaration section:

Public Declare Function SetFileAttributes Lib "kernel32" Alias
"SetFileAttributesA" (ByVal lpFileName As String, ByVal dwFileAttributes As
Long) As Long

Then to set the file attributes, type:

Variable = SetFileAttributes ("File Location", Value)

The FileLocation is the location of the file for which you want to set the file
attributes. The Value is the value given of the attribute you want to set. Here
is a table of Values:

Value Attribute
0 Normal (No Attributes)
1 Read Only
2 Hidden
3 Read Only & Hidden

You can try placing other numbers to set other attributes. So, for example, to
make a file hidden and read only that is located at C:\Work\Work.txt, type:
Variable = SetFileAttributes ("C:\Work\Work.txt", 3)
This was first published in November 2000

Dig deeper on Lotus Notes Domino Administration Tools

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close