What am I doing wrong with this Windows 7 FTP script?Is it possible to run a program through FTP...

Example of a continuous function that don't have a continuous extension

Why can't I see bouncing of a switch on an oscilloscope?

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

Font hinting is lost in Chrome-like browsers (for some languages )

Modeling an IPv4 Address

How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?

How does one intimidate enemies without having the capacity for violence?

What does "Puller Prush Person" mean?

Email Account under attack (really) - anything I can do?

How does strength of boric acid solution increase in presence of salicylic acid?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Can divisibility rules for digits be generalized to sum of digits

How to say job offer in Mandarin/Cantonese?

To string or not to string

Arthur Somervell: 1000 Exercises - Meaning of this notation

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

Writing rule stating superpower from different root cause is bad writing

Why doesn't H₄O²⁺ exist?

What is the word for reserving something for yourself before others do?

Approximately how much travel time was saved by the opening of the Suez Canal in 1869?

How to find program name(s) of an installed package?

Why does Kotter return in Welcome Back Kotter?

Why are electrically insulating heatsinks so rare? Is it just cost?

What's the point of deactivating Num Lock on login screens?



What am I doing wrong with this Windows 7 FTP script?


Is it possible to run a program through FTP prompt?Connecting to Wireless Network via Command Prompt in Windows 7How do I actually open a program from a batch file? All it does is open a command prompt with that file nameWhat is wrong with this FTP server?command for restart system properly making it ask for save/close open applicationsWhat am I doing wrong in my powershell scriptScripting parallel FTP downloads (multiple connections) on WindowsHow to fix truncated PowerShell output, even when I've specified -width 300Cannot upload file to FTP from Excel's VBAHow to loop through files named in a text file? Windows Server 2012






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I am trying to create a text file (commands.txt) for FTP in Windows 7.



The file looks like this...



open 10.10.10.12 9999
USER anonymous
anonymous
GET file1.txt
bye


I then jump to a Command Prompt(administrative) and change directories to where my commands.txt file resides; I check it with dir command.



Then I run...



C:UsersUser1Scripts>ftp.exe -v -n -s:commands.txt


The terminal then shows me the help output for ftp.
I'm stumped to what I'm doing wrong here and I can't use a batch file for this, GUIs, or here-documents. Even if I could, it seems like this SHOULD work and it's killing me not knowing what I'm doing wrong.



Any help would be much appreciated.



Thanks










share|improve this question









New contributor




dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • What encoding did you save the file with? No BOM?

    – LotPings
    yesterday











  • Most command-line tools/commands show you help when you use invalid arguments. I have tried creating your commands.txt and running the command you specified and it tries to connect. Maybe you mistyped the filename or are in anothed directory, ftp.exe shows help when it can't find the file.

    – trogper
    yesterday











  • Note: In Windows 8 and Windows Server 2012 or later operating systems, the text file must be written in UTF-8. Maybe even in windows 7. Check it...

    – Hastur
    yesterday


















1















I am trying to create a text file (commands.txt) for FTP in Windows 7.



The file looks like this...



open 10.10.10.12 9999
USER anonymous
anonymous
GET file1.txt
bye


I then jump to a Command Prompt(administrative) and change directories to where my commands.txt file resides; I check it with dir command.



Then I run...



C:UsersUser1Scripts>ftp.exe -v -n -s:commands.txt


The terminal then shows me the help output for ftp.
I'm stumped to what I'm doing wrong here and I can't use a batch file for this, GUIs, or here-documents. Even if I could, it seems like this SHOULD work and it's killing me not knowing what I'm doing wrong.



Any help would be much appreciated.



Thanks










share|improve this question









New contributor




dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • What encoding did you save the file with? No BOM?

    – LotPings
    yesterday











  • Most command-line tools/commands show you help when you use invalid arguments. I have tried creating your commands.txt and running the command you specified and it tries to connect. Maybe you mistyped the filename or are in anothed directory, ftp.exe shows help when it can't find the file.

    – trogper
    yesterday











  • Note: In Windows 8 and Windows Server 2012 or later operating systems, the text file must be written in UTF-8. Maybe even in windows 7. Check it...

    – Hastur
    yesterday














1












1








1








I am trying to create a text file (commands.txt) for FTP in Windows 7.



The file looks like this...



open 10.10.10.12 9999
USER anonymous
anonymous
GET file1.txt
bye


I then jump to a Command Prompt(administrative) and change directories to where my commands.txt file resides; I check it with dir command.



Then I run...



C:UsersUser1Scripts>ftp.exe -v -n -s:commands.txt


The terminal then shows me the help output for ftp.
I'm stumped to what I'm doing wrong here and I can't use a batch file for this, GUIs, or here-documents. Even if I could, it seems like this SHOULD work and it's killing me not knowing what I'm doing wrong.



Any help would be much appreciated.



Thanks










share|improve this question









New contributor




dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I am trying to create a text file (commands.txt) for FTP in Windows 7.



The file looks like this...



open 10.10.10.12 9999
USER anonymous
anonymous
GET file1.txt
bye


I then jump to a Command Prompt(administrative) and change directories to where my commands.txt file resides; I check it with dir command.



Then I run...



C:UsersUser1Scripts>ftp.exe -v -n -s:commands.txt


The terminal then shows me the help output for ftp.
I'm stumped to what I'm doing wrong here and I can't use a batch file for this, GUIs, or here-documents. Even if I could, it seems like this SHOULD work and it's killing me not knowing what I'm doing wrong.



Any help would be much appreciated.



Thanks







windows-7 windows command-line ftp






share|improve this question









New contributor




dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Hastur

13.6k53268




13.6k53268






New contributor




dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









dlowrie290dlowrie290

62




62




New contributor




dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • What encoding did you save the file with? No BOM?

    – LotPings
    yesterday











  • Most command-line tools/commands show you help when you use invalid arguments. I have tried creating your commands.txt and running the command you specified and it tries to connect. Maybe you mistyped the filename or are in anothed directory, ftp.exe shows help when it can't find the file.

    – trogper
    yesterday











  • Note: In Windows 8 and Windows Server 2012 or later operating systems, the text file must be written in UTF-8. Maybe even in windows 7. Check it...

    – Hastur
    yesterday



















  • What encoding did you save the file with? No BOM?

    – LotPings
    yesterday











  • Most command-line tools/commands show you help when you use invalid arguments. I have tried creating your commands.txt and running the command you specified and it tries to connect. Maybe you mistyped the filename or are in anothed directory, ftp.exe shows help when it can't find the file.

    – trogper
    yesterday











  • Note: In Windows 8 and Windows Server 2012 or later operating systems, the text file must be written in UTF-8. Maybe even in windows 7. Check it...

    – Hastur
    yesterday

















What encoding did you save the file with? No BOM?

– LotPings
yesterday





What encoding did you save the file with? No BOM?

– LotPings
yesterday













Most command-line tools/commands show you help when you use invalid arguments. I have tried creating your commands.txt and running the command you specified and it tries to connect. Maybe you mistyped the filename or are in anothed directory, ftp.exe shows help when it can't find the file.

– trogper
yesterday





Most command-line tools/commands show you help when you use invalid arguments. I have tried creating your commands.txt and running the command you specified and it tries to connect. Maybe you mistyped the filename or are in anothed directory, ftp.exe shows help when it can't find the file.

– trogper
yesterday













Note: In Windows 8 and Windows Server 2012 or later operating systems, the text file must be written in UTF-8. Maybe even in windows 7. Check it...

– Hastur
yesterday





Note: In Windows 8 and Windows Server 2012 or later operating systems, the text file must be written in UTF-8. Maybe even in windows 7. Check it...

– Hastur
yesterday










1 Answer
1






active

oldest

votes


















0














I have found the answer to my question. Shout-out to @LotPings for pointing me in the right direction.



The problem was with the way both notepad and the command prompt were encoding the characters.



Had to follow this advice...
https://stackoverflow.com/questions/16598785/save-text-file-in-utf-8-encoding-using-cmd-exe



The answer was to change the code page using the chcp command.



Apparently my Windows7 box was encoding the file in a format that wasn't supported by ftp. Oddly, using the command prompt to echo the commands into a file suffered from the same problem.



I then used the chcp command



chcp 65001



This changes the encoding to UTF-8, then echo my commands into a file, then run ftp



ftp.exe -v -n -s:commands.txt



and I was golden.



I then changed back to code page 1252



chcp 1252


and all was right with the world.



Thanks for the help all!






share|improve this answer








New contributor




dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    dlowrie290 is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1421898%2fwhat-am-i-doing-wrong-with-this-windows-7-ftp-script%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I have found the answer to my question. Shout-out to @LotPings for pointing me in the right direction.



    The problem was with the way both notepad and the command prompt were encoding the characters.



    Had to follow this advice...
    https://stackoverflow.com/questions/16598785/save-text-file-in-utf-8-encoding-using-cmd-exe



    The answer was to change the code page using the chcp command.



    Apparently my Windows7 box was encoding the file in a format that wasn't supported by ftp. Oddly, using the command prompt to echo the commands into a file suffered from the same problem.



    I then used the chcp command



    chcp 65001



    This changes the encoding to UTF-8, then echo my commands into a file, then run ftp



    ftp.exe -v -n -s:commands.txt



    and I was golden.



    I then changed back to code page 1252



    chcp 1252


    and all was right with the world.



    Thanks for the help all!






    share|improve this answer








    New contributor




    dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      I have found the answer to my question. Shout-out to @LotPings for pointing me in the right direction.



      The problem was with the way both notepad and the command prompt were encoding the characters.



      Had to follow this advice...
      https://stackoverflow.com/questions/16598785/save-text-file-in-utf-8-encoding-using-cmd-exe



      The answer was to change the code page using the chcp command.



      Apparently my Windows7 box was encoding the file in a format that wasn't supported by ftp. Oddly, using the command prompt to echo the commands into a file suffered from the same problem.



      I then used the chcp command



      chcp 65001



      This changes the encoding to UTF-8, then echo my commands into a file, then run ftp



      ftp.exe -v -n -s:commands.txt



      and I was golden.



      I then changed back to code page 1252



      chcp 1252


      and all was right with the world.



      Thanks for the help all!






      share|improve this answer








      New contributor




      dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        I have found the answer to my question. Shout-out to @LotPings for pointing me in the right direction.



        The problem was with the way both notepad and the command prompt were encoding the characters.



        Had to follow this advice...
        https://stackoverflow.com/questions/16598785/save-text-file-in-utf-8-encoding-using-cmd-exe



        The answer was to change the code page using the chcp command.



        Apparently my Windows7 box was encoding the file in a format that wasn't supported by ftp. Oddly, using the command prompt to echo the commands into a file suffered from the same problem.



        I then used the chcp command



        chcp 65001



        This changes the encoding to UTF-8, then echo my commands into a file, then run ftp



        ftp.exe -v -n -s:commands.txt



        and I was golden.



        I then changed back to code page 1252



        chcp 1252


        and all was right with the world.



        Thanks for the help all!






        share|improve this answer








        New contributor




        dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        I have found the answer to my question. Shout-out to @LotPings for pointing me in the right direction.



        The problem was with the way both notepad and the command prompt were encoding the characters.



        Had to follow this advice...
        https://stackoverflow.com/questions/16598785/save-text-file-in-utf-8-encoding-using-cmd-exe



        The answer was to change the code page using the chcp command.



        Apparently my Windows7 box was encoding the file in a format that wasn't supported by ftp. Oddly, using the command prompt to echo the commands into a file suffered from the same problem.



        I then used the chcp command



        chcp 65001



        This changes the encoding to UTF-8, then echo my commands into a file, then run ftp



        ftp.exe -v -n -s:commands.txt



        and I was golden.



        I then changed back to code page 1252



        chcp 1252


        and all was right with the world.



        Thanks for the help all!







        share|improve this answer








        New contributor




        dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered yesterday









        dlowrie290dlowrie290

        62




        62




        New contributor




        dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        dlowrie290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






















            dlowrie290 is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            dlowrie290 is a new contributor. Be nice, and check out our Code of Conduct.













            dlowrie290 is a new contributor. Be nice, and check out our Code of Conduct.












            dlowrie290 is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1421898%2fwhat-am-i-doing-wrong-with-this-windows-7-ftp-script%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

            Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

            VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...