Thread: Cmd Ftp

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

    Join Date
    Feb 2014
    Posts
    8
    Rep Power
    0

    Cmd Ftp


    In cmd, you can access the ftp of a server. I need a .bat file to download the ENTIRE directory when run. Please give code for the .bat file as a reply. I will set it up to where the file runs every hour on my pc (which is rarely used now) so I will have a backup of the files. Any other suggestions if not the .bat code? I want the computer to sleep, then the .bat execute, then after ftp download go back to sleep.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,446
    Rep Power
    1751
    And what did your last slave die of?

    You don't say what the target OS is (it may matter), you don't say why you want to, potentially, backup the same directory on an hourly basis (there may be better ideas).

    No idea about how to get it run as a timed process under Windows, but I assume you'd do it via Task Scheduler.
    The batch file would look something like:

    Code:
    ftp -n IP/hostname
    user USERNAME PASSWORD
    prompt
    bin
    cd /Remote/Dir/To/FTP
    lcd /Local/Dir/For/Backup
    mget *.*
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2014
    Posts
    8
    Rep Power
    0
    It never logs in.

    my code
    Code:
    ftp -n ftp.frostbitetech.org
    user username password
    prompt
    bin
    cd /
    lcd C:\Users\Owner\Desktop\database
    mget *.*

IMN logo majestic logo threadwatch logo seochat tools logo