Moves a file from one location to another.
int move( FileSpecObject source, FileSpecObject dest );
move method has the following parameters:
- A FileSpecObject representing the source file.
- A FileSpecObject representing the target directory.
An integer error code. For a list of possible values, see Return Codes.
You must create a FileSpecObject for the destination directory to pass in for this function. If the destination doesn't already exist a file name for the destination is assumed.
source = getFolder("Program", "file.txt"); dest = getFolder("Chrome"); err = File.move(source, dest);