read-only file

I don´t know how I must use ATTRIB. I try to know the attribute of the file with FILE-INFO:FILE-TYPE but I didn´t obtain it.
thanks
 
file-info:file-name = 'yourefilename'.

file-info:fie-type

cut and pasted from the progress help file ******************88
The FILE-TYPE attribute returns a string containing exactly one of the following file type characters:
- D If the file is a directory.
- F If the file is a standard file or FIFO pipe (UNIX systems).
- M If the file is a member of a Progress procedure library.
- S If the file is a special device (UNIX systems).
- X If the file type is unknown. (Contact your Progress Technical Support representative if you receive this value.)
The attribute string can contain any of the following file type characters:
- H If the file is hidden.
- L If the file is a symbolic link (UNIX systems).
- P If the file is a pipe file (UNIX systems).
- R If the file is readable.
- W If the file is writable.
************************
so you probably get

frw means its a file its readable and writable.
fr means file readable. ie NOT writable so its read only.
 
I try with this code:

IF index('w',FILE-INFO:FILE-TYPE) = 0 THEN message "File is read-only"...

but the result is always frw, even when the file is read-only.
 
def var lv-f as char no-undo.

file-info:file-name = 'readonlytest.txt'.

disp file-info:file-type.

will display frw if file is NOT readonly
will display FR if file is READ only.

What opsys are you on? this tested on Win32 version 9.1d08 works fine.
 
Finished. I don´t know why was not refreshing well file-info:file-name, that is for what always me aparecian the attributes of the same file.
Thanks 2 all for the help.
 
Back
Top