?
Solved

Copy a file from unix to windows using Powerbuilder.

Posted on 2003-03-24
4
Medium Priority
?
572 Views
Last Modified: 2013-12-26
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
Comment
Question by:testsri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:HamdyHassan
ID: 8197303
That's ftp script that you create at your windows, and call it from powerbuilder module
0
 
LVL 9

Accepted Solution

by:
HamdyHassan earned 300 total points
ID: 8197317
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question