Skip to main content

[archive] Hidden Files...

  • September 10, 2008
  • 8 replies
  • 0 views

[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

8 replies

[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
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?

[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
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?

[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
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?

[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
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 :-)

[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
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...

[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
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

[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
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

[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
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