Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying Files in a PowerBuilder App.

Status
Not open for further replies.

bx1423

Programmer
May 8, 2001
14
0
0
US
I was hoping someone could help with this. I am trying to copy a file from one directory to another in my PowerBuilder Application. I am using PB 7.0.2. I have a PB book that says to use the CopyfileA() function, but when I compile, PB complains saying it doesn't know what CopyFileA is.

Can anyone offer some help?

Thanks,

MP
 
It sounds like a Windows API function, which you would need to declare as either a local or global external function:

Function boolean CopyFileA (ref string lpszExistingFile, ref string
lpszNewFile, boolean fFailIfExists) library "KERNEL32.DLL"

Alternatively, you could copy the file using the Run() function to run the DOS COPY command.

As far as I know, there is no built-in function in PowerBuilder to copy files.
 
It sounds like a Windows API function, which you would need to declare as either a local or global external function:

Function boolean CopyFileA (ref string lpszExistingFile, ref string
lpszNewFile, boolean fFailIfExists) library "KERNEL32.DLL"

Alternatively, you could copy the file using the Run() function to run the DOS COPY command.

As far as I know, there is no built-in function in PowerBuilder to copy files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top