Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 604
  • Last Modified:

Copy a file from unix to windows using Powerbuilder.

I am using Powerbuilder 8.0. I need to copy a file from an AIX machine to my windows machine. To be more clear....the s/w should have the ability to automatically move the files from the AIX machine to the Windows machine.
I would be thankful to you if you help me in this.

0
testsri
Asked:
testsri
  • 2
1 Solution
 
HamdyHassanCommented:
That's ftp script that you create at your windows, and call it from powerbuilder module
0
 
HamdyHassanCommented:
example


li_ftpFile = FileOpen(ls_ftpFile, LineMode!, Write!, LockReadWrite!, Replace!)
If li_ftpFile = -1 Then
     MessageBox(This.Title, "Error Creating " + ls_ftpFile)
     Return False
End If

FileWrite(li_ftpFile, "open " + ls_server)
FileWrite(li_ftpFile, ls_username)
FileWrite(li_ftpFile, ls_password)
FileWrite(li_ftpFile, "lcd " + ls_sourceFolder)
FileWrite(li_ftpFile, "cd " + ls_remoteFolder)
FileWrite(li_ftpFile, "put " + ls_sourceFile)
FileWrite(li_ftpFile, "close")
FileClose(li_ftpFile)

ls_dosCommand = 'ftp -s:"' + ls_ftpFile + '"'
li_status = Run(ls_dosCommand, Minimized!)

If li_status = -1 Then
     MessageBox(This.Title, "Error executing the FTP")
     Return False
End If

Return True
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now