| Fred Taylor 2005-07-17, 8:24 pm |
| #DEFINE FILE_ATTRIBUTE_READO
NLY 0x00000001
#DEFINE FILE_ATTRIBUTE_HIDDE
N 0x00000002
#DEFINE FILE_ATTRIBUTE_SYSTE
M 0x00000004
#DEFINE FILE_ATTRIBUTE_DIREC
TORY 0x00000010
#DEFINE FILE_ATTRIBUTE_ARCHI
VE 0x00000020
#DEFINE FILE_ATTRIBUTE_NORMA
L 0x00000080
#DEFINE FILE_ATTRIBUTE_TEMPO
RARY 0x00000100
DECLARE INTEGER SetFileAttributes IN Win32API STRING @cFile, INTEGER
nAttribs
lcFile = "x:\path\yourfile.ext" + CHR(0) && must end in a 0 byte!
*
* lnSet - other bit options not used are RESET!
*
lnSet = FILE_ATTRIBUTE_NORMA
L && Replaced by other attributes
lnSet = BITOR(lnSet,FILE_ATT
RIBUTE_READONLY)
*
* Returns:
* 0 - error
* 1 - success
*
lxRetVal = SetFileAttributes(@l
cFile,lnSet)
--
Fred
Microsoft Visual FoxPro MVP
"ghj" <ghj@ghj.com> wrote in message news:yiBCe.3875$ij3.154@trndny06...
> Is there a command in VFP9.0 to toggle or set/clear a file's read-only
> attribute.
>
> Thanks
>
>
|