iFtpPut to Unix Server
Keywords: iFtpPut
Question:
I am trying to FTP a file to a "sub-directory" on a Unix server. However, the file goes to the root directory (with the sub-directory name NOW included with the filename. It just PUTs the file in the WRONG place. Any assistance very much appreciated.Example:
I want to put the TRANS301.zip file into the /morning sub-directory.
After the iFtpPut the file is stored in the root directory as: \morning\TRANS301.zip
Below is the snippet of code I am using:
filenam=fileroot(locfilename) ext=fileextension(locfilename) targfilename=strcat("\morning\",filenam,".",ext) fsize=itemextract(3,locfilename,@Tab) ret=iFtpPut(conhandle,locfilename,targfilename,fsize,@BINARY)Answer:
The slashes go the other way in Unix. Try...targfilename=strcat("/morning/",filenam,".",ext) fsize=itemextract(3,locfilename,@Tab) ret=iFtpPut(conhandle,locfilename,targfilename,fsize,@BINARY)
Article ID: W14205Filename: iFtpPut to Unix Server.txt