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

    Join Date
    Jul 2004
    Posts
    140
    Rep Power
    13

    Comments In A FTP Script


    Is it possible to add comments to a FTP script? I have a rather complicated FTP script and would like to break it up with some comments to make it a bit more readable should the need arise to go in and modify it later.
  2. #2
  3. No Profile Picture
    Brony & F/OSS Advocate
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2003
    Location
    Anaheim, CA (USA)
    Posts
    6,653
    Rep Power
    2475
    What do you mean?

    Is it simply a list of FTP commands to run as a batch job, for example? Or is it a shell script that runs when you login to your FTP server? Or what exactly are you reffering to?
    ~~ Peter ~~ :: ( Who am I? ) :: ( Peter's Musings: Uploading myself, bit by bit... ) :: ( Electronic Frontier Foundation ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) :: ( About me on the WIki )
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    140
    Rep Power
    13
    Originally Posted by codergeek42
    What do you mean?

    Is it simply a list of FTP commands to run as a batch job, for example? Or is it a shell script that runs when you login to your FTP server? Or what exactly are you reffering to?
    Batch File Contents Used To Launch The Whole Process:
    ftp.exe -s:script.txt



    script.txt File Contents:
    open ftp.myserver.com
    username
    password
    prompt
    mget *.*
    bye


    I want to put comments into the script.txt file. The script file that I will be using has a lot more FTP commands in it than this one. Hence the desire for some comments. I'm starting to doubt that this is even possible...
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    140
    Rep Power
    13

    Add Comments To A FTP File (Figured It Out)


    From doing some additional Internet sleuthing, I found a way of adding the comments that I wanted to my FTP script. If you type "!REM" in your script followed by a comment, you can have meaningful comments inserted into a FTP script. Though "!REM" is not a true FTP command, it still serves the purpose. Here is an example:

    !REM This is a comment

    That's all you have to do, and it works without flaw.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2006
    Posts
    1
    Rep Power
    0

    use "!#" in a Unix environment


    If you are in a Unix environment "!REM" will not work.
    You will need to use "!#" as in ...

    ftp> !# This is a comment
    ftp> open 999.999.999.999
    ftp> .....

IMN logo majestic logo threadwatch logo seochat tools logo