Skip to main content

Download file from server

Author: lalitpct@gmail.com (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
filebox/save
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?

Download file from server

Author: lalitpct@gmail.com (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
filebox/save
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?

If you want the contents of a file lfileopen should be able to read it to a variable for you. If you want the output of a command, check out Operating System Commmand signatures, and then COMMANDOUT operation.


Author: Iain Sharp (i.sharp@pcisystems.co.uk)

Download file from server

Author: lalitpct@gmail.com (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
filebox/save
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?

But its same as what we already used above ,command is as shown below
unixos(cat <file>,output) (command in unix to read unix file , putting result in output)
filebox/save
lfiledump output, "%%$result"

here unixos is commandout is executed on server (unix) and then copied to variable ,which is then dumped to local machine (windows).
It works fine for ascii file and small file ,but creates problem for
1)Big size file
2)Binary files


 


Author: lalitpct (lalitpct@gmail.com)

Download file from server

Author: lalitpct@gmail.com (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
filebox/save
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?

Hi Lalit,

Unfortunately, uniface works with x00 separated strings.

So whenever a binary file has this value; it is treated as the end of the string.

 

Perhaps you can experiment using RAW for your variable, which transfers the characters to "printable" characters including the x00

 

 

But I think there are better tools to download files from a server to a client without bringing the whole file into a uniface application.

Maybe some FTP agent like Filezilla would suit your needs


Author: ulrich-merkel (ulrichmerkel@web.de)

Download file from server

Author: lalitpct@gmail.com (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
filebox/save
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?


Thanks ,
users are given acess to only uniface application , hence will try with raw kind of variable.
By the way what will be the size limit ,any idea ?


Author: lalitpct (lalitpct@gmail.com)

Download file from server

Author: lalitpct@gmail.com (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
filebox/save
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?

I have implemented NcFTP (http://www.ncftp.com/) from within a Uniface application to allow for ftp access between machines without the fileload/filedump. Why are you using cat? If you are running services on the unix box, use lfileload to load a variable, pass it to the client in an outparam then lfiledump to save it. Iain


Author: Iain Sharp (i.sharp@pcisystems.co.uk)

Download file from server

Author: lalitpct@gmail.com (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
filebox/save
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?

does cat on a binary file really give the correct binary output, or just some sort of visual representation?


Author: Theo Neeskens (tneeskens@itblockz.nl)

Download file from server

Author: lalitpct@gmail.com (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
filebox/save
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?

its shows non printable characters.


Author: lalitpct (lalitpct@gmail.com)