Dear All,
how can i set multiple attrib for a file using FAttrib() method. For eg. Hidden and system together in a single Fattrib command
Sanil
Dear All,
how can i set multiple attrib for a file using FAttrib() method. For eg. Hidden and system together in a single Fattrib command
Sanil
FAttrib(FileName,02+04) // 02 -> Hidden and 04 -> SystemThank you,
Its working, Now i can set multiple attrib for a folder or a file using FAttrib(). But Sir I have one more question
How can I remove the attrib from a folder or a file using FAttrib().
Or is there any other function for it
Sanil
Sanil,
FAttrib(cFileName, ) ie without any parameter resets the attrib to empty
I don't know hot to reset a particular attrib alone ie to change READ ONLY attribute alone if the file already has a HIDDEN and READ ONLY attribute is set.
Regards
Anser
anserkk wrote:
FAttrib(cFileName, ) ie without any parameter resets the attrib to empty
I don't know hot to reset a particular attrib alone ie to change READ ONLY attribute alone if the file already has a HIDDEN and READ ONLY attribute is set.
Sanil,
You need to use nXor() to exclude the attributes that you don't want.
Or use nAnd() to select the attributes that you just want.
Antonio Linares wrote:
You need to use nXor() to exclude the attributes that you don't want.
Or use nAnd() to select the attributes that you just want.
function Main()
local nAttrib := FAttrib( "test.prg" )
MsgInfo( nAttrib ) // 32 is shown
FAttrib( "test.prg", nOr( nAttrib, 4 ) ) // We want to set "system style"
MsgInfo( nAttrib := FAttrib( "test.prg" ) ) // 36 is shown
FAttrib( "test.prg", nXor( nAttrib, 4 ) ) // We want to remove "system style"
MsgInfo( FAttrib( "test.prg" ) ) // 32 is shown again
return nil