FileMove

Description

Moves a file.

Syntax

FileMove ( sourcefile, targetfile )

Argument

Description

sourcefile

String for the name of the file you want to move

targetfile

String for the name of the location you are moving the file

Returns

Integer. Returns values as follows:

Usage

You cannot write to a target file if a file with the same name already exists in the target directory. If you want to copy over a target file, you can use FileCopy and set the replace argument to true.

Examples

Example 1

This example moves a file from the current directory to a different directory and saves the return value in the li_FileNum variable:

integer li_FileNum

li_FileNum = FileMove ("june.csv", &
   "H:/project/june2000.csv" )

See also