hover animation preload hover animation preload hover animation preload
wordpress post entry title background
FTPplanet.com forums
post entry title background

File Transfer Planet Forums » FTP Help and Tips

FTP batch file

(6 posts)
  • Started 2 years ago by Anonymous
  • Latest reply from anonymous
  • This topic is resolved

Tags:

  1. Anonymous

    Can anyone help me with an ftp batch file? The problem I am having is....How to get the batch file to automatically put in the user and the password?
    Thanks in advance!
    Matt

    Posted 2 years ago #
  2. Anonymous

    if you use the -s switch (in Windows anyway, not sure of other os's) followed by a : and a filename (with path) the batch will look in that file for the login information. the first line needs to be the user name, the second line is the password, subsequent lines can contain any ftp commands to be executed.
    hope this helps

    Posted 2 years ago #
  3. Anonymous

    You should create two files: one ir an executable file the other is data file.
    Let's cal them http://ftp.bat anf ftp (no extention)
    http://ftp.bat will comntain:
    ftp -s:ftp
    ftp will contain:
    open http://ftp.planet.com
    user (put ur login username)
    password (put ur login password)
    ls
    mget *.txt
    lcd c:\temp
    quit
    Good luck

    Posted 2 years ago #
  4. Anonymous

    I had one more question related to yours one for this example code: Shell ("c:\winnt\system32\ftp -n -s:c:\crms\crmps_rentals_mexico_monthend.ftp")
    in a macro means??

    Posted 2 years ago #
  5. Anonymous

    I usually write one .bat file that will create the command file then run the ftp using the commands in the file. Here's an example.
    Replace anything within ~'s with your own information.
    Hope this helps.
    Echo ~UsrName~> ftpcmd.txt
    echo ~myPass~>> ftpcmd.txt
    echo binary>> ftpcmd.txt
    echo prompt n>>ftpcmd.txt
    echo mget *.exe>> ftpcmd.txt
    echo bye >> ftpcmd.txt
    ftp -s:ftpcmd.txt ~ftpAddress~
    del ftpcmd.txt

    Posted 2 years ago #
  6. hackett
    Member

  7. Anonymous

    I hope that someone can help me. I am new to writing batch files and I am not quite sure how to write the following code. Any help would be appreciated. I would like a batch file to connect to a server using ftp, then write a list of filenames from the ftp folder into a text file. The text file can either be written locally or in the ftp folder itself as long as I can get access to it. Please can someone help.
    ------------------------------------------------

    Posted 1 year ago #

RSS feed for this topic

Reply

(required)

Allowed markup: a blockquote code em strong ul ol li img.
You can also put code in between backtick ( ` ) characters.


Fatal error: Call to undefined function mini_stats() in /home/ftplanetipswitch/filetransferplanet.com/forums/my-templates/flapkakumei/footer.php on line 19