Highlighted
Absent Member.
Absent Member.
200 views

[archive] Hidden Files...

[Migrated content. Thread originally posted on 10 September 2008]

Hello,

7.2.0

Is it possible to change a file attribute to 'hidden' from Acu-cobol?
If yes, is it possible also to access it in case it's hidden?

Thanks
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Hidden Files...

Are you referring to files created by COBOL file I-O?
In that case a file will be created on disk (somewhere) it can not be hidden. You can use encryption if you are worried about someone trying to access data in the file via non-COBOL file I-O.

What do you mean by hidden?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Hidden Files...

ACUCOBOL itself has no means to set the hidden attribute of a file, but you can certainly use Windows API to do this.

You should be able to access the file, whether it is hidden or not. However, that should be pretty easy to test 🙂
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Hidden Files...

Hello,

A hidden file, is a file which has an attribute to make it unvisable to the user. ex. windows system files are hidden to stop normal user from deleting it.
In other words, I've an idea of making a some important applicatrion files hidden from the users even administrators to aviod sudden deletion.
Anyway, thanks for the tips.

Greetings...
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Hidden Files...

Do you need to see what the settings are or just be able to change setting?

You could use the Windows API, or you could just cheat!

           MOVE "attrib -r " TO WS-CMD-LINE(01:10)
           MOVE WS-DEST-NAME TO WS-CMD-LINE(11:)
           CALL "C$SYSTEM" USING WS-CMD-LINE, 32, GIVING FILE-STATUS
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.