Easy Pass to Secure File Transfer
TM
»User: »Password:   Remember Me? 
Sysax Product Forums / Sysax FTP Automation / General Discussion / ftpupload reports success but no files
Posted:  15 Mar 2011 20:33   Last Edited By: dperry
I have ftpdownload working flawlessly but when I try to implement ftpupload nothing reaches the destination. ftpresult equals success on each upload but the files are not there.

I keep receiving two errors on each file.

550 File not found
Could not obtain the size of the remote file
and
550 File not found
Could not update remote file time

log file for one file
Executing script F:\Infin\Tuni\tuniInventory.fscr
Script Engine: Line 11: Executing setvar. Parameter(s):  ~server_address  "**.**.***.***"
Script Engine: Line 12: Executing setvar. Parameter(s):  ~server_port  21
Script Engine: Line 13: Executing setvar. Parameter(s):  ~login_name  "********"
Script Engine: Line 14: Executing setvar. Parameter(s):  ~login_password  "*******"
Script Engine: Line 15: Executing setvar. Parameter(s):  ~local_path  "f:\infin\tuni\inventory"
Script Engine: Line 16: Executing setvar. Parameter(s):  ~remote_path  "/input"
Script Engine: Line 17: Executing setvar. Parameter(s):  ~local_fileformat  "*.TXT"
Script Engine: Line 35: Executing ftpconnect. Parameter(s):  ~server_address  ~server_port  ~login_name  (not displayed)
220-tuni FTP
220 Unauthorized access if prohibited
USER Rockabillia
331 Password required for *******
PASS (hidden)
230 Logged on
PWD
257 "/" is current directory.
PWD
257 "/" is current directory.
Remote path: /
Local  path: C:\Program Files\SysaxAutomation\
command: ftpconnect; argument: **.**.***.***, 21, *******, ********; status: pass;
Script Engine: Line 43: Executing enablepasv
Script Engine: Line 46: Executing ftpsetpath. Parameter(s):  local  ~local_path
Local  path: f:\infin\tuni\inventory
Script Engine: Line 48: Executing ftpsetpath. Parameter(s):  remote  ~remote_path
CWD /input
250 CWD successful. "/input" is current directory.
PWD
257 "/input" is current directory.
Remote path: /input
Script Engine: Line 53: Executing ftpgetlist. Parameter(s):  local  @local_list
Successfully obtained local folder listing
Script Engine: Line 61: Executing ftpwildcardmatch. Parameter(s):  $loc_item.name  ~local_fileformat  "i"
Script Engine: Line 69: Executing ftpupload. Parameter(s):  file  $loc_item.name
TYPE I
200 Type set to I
SIZE ship__02102011092020.txt
550 File not found
Could not obtain the size of the remote file
PASV
227 Entering Passive Mode (********,250,22)
STOR ship__02102011092020.txt
150 Connection accepted
226 Transfer OK
MDTM 20110315140444 ship__02102011092020.txt
550 File not found
Could not update remote file time
CWD /input
250 CWD successful. "/input" is current directory.
PWD
257 "/input" is current directory.
command: ftpupload; argument: file, ship__02102011092020.txt; status: pass;

script
#-------------------------initialize section-----------------
setvar ~server_address, "**********";
setvar ~server_port, 21;
setvar ~login_name, "********";
setvar ~login_password, "*******";
setvar ~local_path, "f:\\infin\\tuni\\inventory";
setvar ~remote_path, "/input";
setvar ~local_fileformat, "*.TXT";
#------------------------------------------------------------
setduperules bydate, skip, skip, skip;
ftpconnect(~server_address, ~server_port, ~login_name, ~login_password);
if ftpresult eq success begin
  print "command: ftpconnect; argument: ", ~server_address, ", ", ~server_port, ", ", ~login_name, ", ", ~login_password, "; status: pass;";
  enablepasv;
  ftpsetpath local, ~local_path;
  ftpsetpath remote, ~remote_path;
  ftpgetlist local, @local_list;
  foreach $loc_item in @local_list begin
    if $loc_item.isfolder eq false begin
      ftpwildcardmatch $loc_item.name, ~local_fileformat, "i";
      if success eq ftpresult begin
        ftpupload file, $loc_item.name;
        if ftpresult eq success begin
          print "command: ftpupload; argument: file, ", $loc_item.name, "; status: pass;";
        end else begin
          print "command: ftpupload; argument: file, ", $loc_item.name, "; status: fail;";
        end
      end
    end
  end
end else begin
  print "command: ftpconnect; argument: ", ~server_address, ", ", ~server_port, ", ", ~login_name, ", ", ~login_password, "; status: fail;";
end
ftpdisconnect;
endscript;
Posted:  15 Mar 2011 23:52
Update. I have noticed I can upload to the root dir but not any sub folders off of it. Thanks
Posted:  16 Mar 2011 20:59
solved
 

Copyright © 2008 Codeorigin, LLC - All Rights Reserved.
XML RSS 2.0 XML Atom 1.0