FileMove – PB Docs 2017

FileMove

PowerScript function

Description

Moves a file.

Syntax

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

Return value

Integer.

Returns values as follows:

1 — Success

-1 — Error opening sourcefile

-2 — Error writing targetfile

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

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

See also

FileCopy

GetCurrentDirectory


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x