#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    FTP Missing files


    Hi guys.
    I need a help. I have a process that a copy a couple of files to my customer FTP in each workday hours.
    But, sometimes, my customer says that I didn't copy this file to the FTP and I have all log in my system that I copied the file. My customer doesn't belive in my log. He thinks that my system has a problem.
    My question is: is there a safety way to copy the files to FTP folders and make sure that they were there?
    I think that could be a problem in their system. He can copy 1 file and delete the others one, for example.

    tks.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Location
    Dubai
    Posts
    5
    Rep Power
    0
    Yeah, I guess there is a problem these days. Faced issue same like this some days ago.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    spaceBAR Central
    Posts
    225
    Rep Power
    41
    In your ftp script you could do a 'ls' for each file you transferred which will prove/disprove the file(s) exists on target host, For example:

    Code:
    $ cat test_ftp.sh
    
    # test_ftp.sh
    ftp -vn xxx.yyy.com <<ENDSCRIPT >>/tmp/list.txt
    user zzzzz password
    cd /tmp
    lcd /tmp
    put test.txt
    ls test.txt
    quit
    ENDSCRIPT
    
    $ cat /tmp/list.txt
    
    Connected to xxx.yyy.com.
    220-Warning: Authorized Personnel Only. All activities are monitored
    220-
    220 xxx.yyy.com FTP server ready.
    331 Password required for zzzzz.
    230 User zzzzz logged in.
    250 CWD command successful.
    Local directory now /tmp
    200 PORT command successful.
    150 Opening ASCII mode data connection for test.txt.
    226 Transfer complete.
    local: test.txt remote: test.txt
    1262 bytes sent in 0.0013 seconds (969.72 Kbytes/s)
    200 PORT command successful.
    150 Opening ASCII mode data connection for file list.
    test.txt
    226 Transfer complete.
    remote: test.txt
    10 bytes received in 0.00024 seconds (40.61 Kbytes/s)
    221-You have transferred 1262 bytes in 1 files.
    221-Total traffic for this session was 1898 bytes in 2 transfers.
    221-Thank you for using the FTP service on xxx.yyy.com.
    221 Goodbye.

IMN logo majestic logo threadwatch logo seochat tools logo