Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

FileCopy – PB Docs 150 – PowerBuilder Library

FileCopy – PB Docs 150

FileCopy PowerScript function

Description

Copies one file to
another, optionally overwriting the target file.

Syntax

Argument

Description

sourcefile

String for the name of the file you want
to copy

targetfile

String for the name of the file you are
copying to

replace
(optional)

Boolean specifying whether to replace
the target file (true) or not (false)

Return Values

Integer. Returns values as follows:

  • 1 – Success

  • -1 – Error opening sourcefile

  • -2 – Error writing targetfile

Usage

If you do not specify a fully qualified path for sourcefile or
for targetfile, the function works relative
to the current directory. If you do not specify the replace argument,
the FileCopy function does not replace a file
in the target directory that has the same name as the name you specify
in the targetfile argument (This is equivalent
to setting the replace value to false).

Examples

The following example copies a file from the current
directory to a different directory and saves the return value in
a variable. It does not replace a file of the same name if one already
exists in the target directory:

See Also


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