Transfer of fie

mayank

Member
Hello All,

I want to transfer a file using progress 4 gl code..we are on linux platform and trying to transfer file to Network folder on window platform.

Can any one gave me any idea to do this.

Thanks in Advance.

Best Regards,

Mayank Sharma
 

RealHeavyDude

Well-Known Member
I would create a shell script that acutally does the copy. Furthermore since os-command does not return any os error ( exit status of the script ) you would need to implement your own error handling. Usually I do this in having the script create a particular file that will only exist when something went wrong that includes the error message or exit status. After having invoked the shell script with OS-COMMAND I usually then check whether that particular file exists. If it does exist I know that something went wrong and then I would parse the error message or exit status to handle it in the ABL.

Heavy Regards, RealHeavyDude.
 

mayank

Member
You will need an os command for that.
Either use the os-copy or os-command statement.
..

Hello,

I typed below statement for this .....But not able to copy....

os-copy value("aa.prn") value("//window machine/user/aa1.prn").
 

Cringer

ProgressTalk.com Moderator
Staff member
Have a look at the context help for OS-COPY. I don't think you have the syntax correct. Also, you need to post more info on why it didn't work if you want us to help. Did you get an error? What was it? How do you know it didn't work?
 

mayank

Member
Have a look at the context help for OS-COPY. I don't think you have the syntax correct. Also, you need to post more info on why it didn't work if you want us to help. Did you get an error? What was it? How do you know it didn't work?

Hi,

I have not got any error when running this. File has not moved to destination Directory..
 

Cringer

ProgressTalk.com Moderator
Staff member
I would create a shell script that acutally does the copy. Furthermore since os-command does not return any os error ( exit status of the script ) you would need to implement your own error handling. Usually I do this in having the script create a particular file that will only exist when something went wrong that includes the error message or exit status. After having invoked the shell script with OS-COMMAND I usually then check whether that particular file exists. If it does exist I know that something went wrong and then I would parse the error message or exit status to handle it in the ABL.

Heavy Regards, RealHeavyDude.

This is good advice.
 

mayank

Member
I would create a shell script that acutally does the copy. Furthermore since os-command does not return any os error ( exit status of the script ) you would need to implement your own error handling. Usually I do this in having the script create a particular file that will only exist when something went wrong that includes the error message or exit status. After having invoked the shell script with OS-COMMAND I usually then check whether that particular file exists. If it does exist I know that something went wrong and then I would parse the error message or exit status to handle it in the ABL.

Heavy Regards, RealHeavyDude.

Hi,

Can you please send me that script....

Thanks in Advance.

Best Regards,

Mayank Sharma
 

RealHeavyDude

Well-Known Member
Sorry - I can't, for several reasons:

For one you don't give much useful information. For example you don't say anything what type of access you have from the Linux box you're on to the Windows Network folder. Probably you need something like FTP to transfer the file from *nix to a Windows box.

Secondly, writing a shell script that copies a file, for example, via FTP is quite simple and you should be able to find gazillions of them by just google'ing a little bit.

Thirdly, even if I had one at my disposal I am not allowd to send anything that is IP of my employer.

Heavy Regards, RealHeavyDude.
 
Top