Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Foxlib v1.0 - <b>setattr</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SETATTR

Syntax:                 SETATTR

Use:                    To set the file attribute.

Parameters:             The subdirectory, the file name, and the file
                        attribute (e.g. \FOXPRO\FOXPROLN.EXE,!).  You do not
                        include the drive letter, but you must begin the
                        path with a backslash "\".

Returns:                The first character in the sending parameter will
                        have a "Y" if the file attribute was set, a "N" if
                        the file attribute was not set.  If you did not pass
                        the parameter correctly (e.g. FOXLIB =
                        "\FOXPRO\"), your sending parameter will be
                        unchanged.

Example:                . load c:\FOXLIB\setattr
                        . FOXLIB = "\FOXPRO\MIKE.TXT,!"
                        . call setattr with FOXLIB
                        . ?substr(FOXLIB,1,1) = "Y"
                        .T.
                        . rele modu setattr

                        From this example, the file attribute was set to
                        archive and read-only.  Below is a list of
                        parameters to use in setting file attributes.

                        Archive, system, hidden, read-only = '
                        Archive, system, hidden            = &
                        Archive, system                    = $
                        Archive, read-only                 = !
                        Archive, hidden                    = #
                        Archive                            = space
                        System, hidden                     = 6
                        System, read-only                  = 5
                        System                             = 4
                        Hidden, read-only                  = 3
                        Hidden                             = 2
                        Read-only                          = 1

                        When setting just the archive file attribute, use
                        a space.  For example:
                        . FOXLIB = "\FOXPRO\MIKE.TXT, "

Notes:                  You can only set the file attribute from the current
                        drive.  For example, you are in drive C, and you
                        want to set the file attribute for a file on drive
                        D.  Use the SETDRIVE command to set the current
                        drive to D, and then use the SETATTR command.

See Also: GETATTR

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson