Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>filemove()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FILEMOVE()

Syntax:     FILEMOVE(<expC1>,<expC2>)

Arguments:  <expC1> denotes the name and path of the original file.
            <expC2> denotes the name and path of the target file.

Returns:    A numeric value.
            The function will return a 0 if it is possible to move the file,
            otherwise an error code is returned.

            Code        Definition
            ----        ----------
               0        Function OK
              -2        File not found
              -3        Access path not found
              -5        Access refused (e.g. in the network)
              -17       Target file not on the same drive

Usage:      Moving a file is much faster than copying and deleting a
            file.  It is similar in many respects to renaming the file, but
            also includes the path names to rename it to another
            directory, if required.

Notes:      A drive designator and path name are allowed in the file
            name <expC1> and <expC2>.  Wildcards are not allowed.
            FILEMOVE() will NOT work across different drives, since a
            file can only be moved within a single drive.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * To move a file from "\OLD" to "\NEW".
            IF FILEMOVE("\OLD\FILENAME.DBF","\NEW\FILENAME.DBF") = 0
               ? "The file is now located in the \NEW directory."
            ENDIF



See Also: DELETEFILE()

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