Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Problem with FTP  (Read 11951 times)

0 Members and 1 Guest are viewing this topic.

Helpmeh

    Topic Starter


    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Problem with FTP
« on: September 07, 2009, 02:02:27 PM »
Hey, I'm trying to use ftp to send and recieve files, but I noticed it was taking a really long time to continue on with the script, and the file I was supposed to recieve never came. I added pause after it and I got this:

Connecting to 0catch.com.
Connection closed by remote host.
Press any key to continue . . .

Can anyone help?
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Problem with FTP
« Reply #1 on: September 07, 2009, 02:05:59 PM »
What client ? ?
" Anyone who goes to a psychiatrist should have his head examined. "

Helpmeh

    Topic Starter


    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Problem with FTP
« Reply #2 on: September 07, 2009, 02:08:50 PM »
It's in batch, with the FTP command.
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Problem with FTP
« Reply #3 on: September 07, 2009, 02:15:49 PM »
Then you need to post your batchfile...
" Anyone who goes to a psychiatrist should have his head examined. "

Helpmeh

    Topic Starter


    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Problem with FTP
« Reply #4 on: September 07, 2009, 02:19:14 PM »
@echo off
:loop
cls
echo open>C:\schoolchatdatar.oti
echo USERNAME>>C:\schoolchatdatar.oti
echo PASSWORD>>C:\schoolchatdatar.oti
echo get test.txt>>C:\schoolchatdatar.oti
echo bye>>C:\schoolchatdatar.oti
pause
ftp -i -s:C:\schoolchatdatar.oti 0catch.com
pause
del C:\schoolchatdatar.oti
type test.txt
rem The above confirms that the FTP is working correctly and the file exists.
pause
goto loop


That's the code I started with. I haven't even started my real code because I need this to work first.
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

Helpmeh

    Topic Starter


    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Problem with FTP
« Reply #5 on: September 09, 2009, 01:40:15 PM »
Anyone?
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

gh0std0g74



    Apprentice

    Thanked: 37
    Re: Problem with FTP
    « Reply #6 on: September 09, 2009, 05:36:09 PM »
    you just put a "pause" in your script for troubleshooting right? or is it part of the logic.?

    Helpmeh

      Topic Starter


      Guru

    • Roar.
    • Thanked: 123
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 8
    Re: Problem with FTP
    « Reply #7 on: September 09, 2009, 05:42:57 PM »
    Troubleshooting. I wanted to find out why the files weren't being transfer.
    Where's MagicSpeed?
    Quote from: 'matt'
    He's playing a game called IRL. Great graphics, *censored* gameplay.

    gh0std0g74



      Apprentice

      Thanked: 37
      Re: Problem with FTP
      « Reply #8 on: September 09, 2009, 06:25:09 PM »
      make sure you there is no firewall restricting your ftp connection between u and the other side
      Quote
      ftp -i -s:C:\schoolchatdatar.oti 0catch.com

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Problem with FTP
      « Reply #9 on: September 09, 2009, 06:29:34 PM »
      Use a FTP client.
      For example, the old WS_FTP still works and will run from the command line and in a batch file.

      Helpmeh

        Topic Starter


        Guru

      • Roar.
      • Thanked: 123
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 8
      Re: Problem with FTP
      « Reply #10 on: September 09, 2009, 06:53:15 PM »
      I don't think there is an issue with my firewall. I'll try that ftp client if I get a chance.
      Where's MagicSpeed?
      Quote from: 'matt'
      He's playing a game called IRL. Great graphics, *censored* gameplay.

      gh0std0g74



        Apprentice

        Thanked: 37
        Re: Problem with FTP
        « Reply #11 on: September 09, 2009, 07:33:23 PM »
        the error message posted in your first post is very clear.. the packets reached the remote host but its closed by it. most probably, there might be firewall issues AT THE OTHER SIDE. make sure the other side allows ftp for you. Also make sure the other side gives your account the access to ftp.

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #12 on: September 09, 2009, 07:36:54 PM »
        It does have FTP. It even gives a deal on CuteFTP. And I used the proper information.
        Host: 0catch.com
        Username: sub-domain.0catch.com
        Password: Login password.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: Problem with FTP
        « Reply #13 on: September 09, 2009, 08:43:05 PM »
        Quote
        Host: 0catch.com
        Username: sub-domain.0catch.com
        Password: Login password.

        Something is not right. I tried to ftp to that site and it did not like the password. A password should not have a space in it.

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #14 on: September 09, 2009, 08:50:23 PM »
        I just put that there. It's not my password. The password you use for ftp is the password used to log in to the site's cp.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #15 on: September 14, 2009, 07:56:21 PM »
        Anyone?
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #16 on: September 15, 2009, 08:16:21 PM »
        I really hate people who bunp their own thread, but now I know how it feels. :-\
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: Problem with FTP
        « Reply #17 on: September 15, 2009, 11:36:26 PM »
        I really hate people who bunp their own thread, but now I know how it feels. :-\
        My personal view is to first make sure the connection works well with a reliable FTP client. Then , if you have to, use the FTP thing from the command line. The FTP client has better error messages and, IMO, is  easier to troubleshoot.
        Here is just part of the WS_FTP Pro   documentation.

        Quote
        Command Line Options
        WS_FTP Pro Command

        The command for using WS_FTP Pro from the command line differs depending on which version you installed. Replace ftpro with the executable name of the version you are currently using, for example ftp95 or ws_ftp. See WS_FTP Versions for a list of the executable names for each version.

        Syntax

        Use the following syntax to transfer a file using the command line. Command arguments, as well as other items enclosed in brackets, are optional. Italics indicate a variable, for example hostname. The bar character "|" means OR, for example hostname | local means you enter either a hostname or the word "local.")

        Note: Use the -m argument for transferring multiple files. (Not available in WS_FTP Limited Edition.)

           To transfer a file from the remote system to the local system, use

        ftp95pro [command arguments] hostname | profilename:pathname/filename [local:
        pathname/[filename]

        hostname: or profilename:

        hostname must be the full domain name or the IP address of a remote host. The User ID will be anonymous and the password will be the specified e-mail address. The hostname must be followed by a colon.

        profilename must be the name of a session profile created in the Session Properties dialog box. If the profile contains your username and password (and you checked the Save Password box), these are used. If the profile is not in the default .ini file, use the -i argument to specify another .ini file. profilename must be followed by a colon.
        Note: Processing rules for this operation are to use the host, User ID, password, account and gateway/firewall information specified in the profilename if one exists. If one doesn't exist, it is assumed that the hostname is an actual host and the User ID will be anonymous and the password will be the specified e-mail address.

        pathname/filename   

        Enter the pathname, including the drive letter, and the filename for the file on the remote system. (For example, c:\docs\report.txt)

        local:pathname/filename   

        Enter the pathname, including the drive letter, and the filename for the file on the local system. (The pathname/filename is preceded by the word local followed by a colon, loc

        I have been able to use the command line option of the free version to send files to multiple websites in a big batch file so that I would not have to do each one by hand.

        mroilfield



          Mentor
        • Thanked: 42
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 11
        Re: Problem with FTP
        « Reply #18 on: September 15, 2009, 11:54:45 PM »

        echo open>C:\schoolchatdatar.oti
        echo USERNAME>>C:\schoolchatdatar.oti
        echo PASSWORD>>C:\schoolchatdatar.oti
        echo get test.txt>>C:\schoolchatdatar.oti
        echo bye>>C:\schoolchatdatar.oti
        pause
        ftp -i -s:C:\schoolchatdatar.oti 0catch.com
        pause
        del C:\schoolchatdatar.oti
        .

        The above sure does have the word School in it a lot. Are you trying to do something on your school computers that you aren't supposed to do?
        You can't fix Stupid!!!

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #19 on: September 16, 2009, 04:18:27 AM »
        There is currently no rule against using a computer to communicate to an other computer. And this was at home. I want to make sure it works before I check it at school to see if its blocked.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        mroilfield



          Mentor
        • Thanked: 42
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 11
        Re: Problem with FTP
        « Reply #20 on: September 16, 2009, 04:31:05 AM »
        There is currently no rule against using a computer to communicate to an other computer. And this was at home. I want to make sure it works before I check it at school to see if its blocked.

        Why not just ask your teacher if it is blocked?
        You can't fix Stupid!!!

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #21 on: September 16, 2009, 03:27:05 PM »
        Teachers wouldn't know. This code is supposed to check if the host works normally. I'm just wondering if it's my code that's the problem, and not the host.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: Problem with FTP
        « Reply #22 on: September 16, 2009, 03:38:16 PM »
        Simple. Just test your code on a open ftp site near you.
        http://www.ftp-sites.org/

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: Problem with FTP
        « Reply #23 on: September 16, 2009, 05:35:44 PM »
        The code isn't the issue...
        The access may be however.
        " Anyone who goes to a psychiatrist should have his head examined. "

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #24 on: September 16, 2009, 05:38:25 PM »
        Well it says the connection has been closed, not incorrect password. I really don't know why the host is acting up. Can anyone point me to a free ftp host.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: Problem with FTP
        « Reply #25 on: September 16, 2009, 06:32:09 PM »
        Not from school...no.
        I think you are misunderstanding what FTP is and does...
        " Anyone who goes to a psychiatrist should have his head examined. "

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #26 on: September 16, 2009, 06:36:41 PM »
        Well, I know what ftp does. I am trying to transfer files from 1 computer to another. One computer appends a file to a file on the host, and the second computer gets that file from the host.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: Problem with FTP
        « Reply #27 on: September 16, 2009, 09:25:06 PM »
        At school they prevent you from sending stuff out.
        It is a security thing. Or maybe an proper usage issue.
        At school the expect you to be reading stuff off the network,
        not sending out stuff.
        The administrator can tell you what methods of sending information are allowed.
        FTP means two-way exchange, so they would block that. It normally is on the port called 21. For a web page the port is 80.

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: Problem with FTP
        « Reply #28 on: September 16, 2009, 10:06:00 PM »
        personally, I think the issue is obvious.

        ftp -i -s:C:\schoolchatdatar.oti 0catch.com

        you have the FTP site... but what file are you downloading from the ftp site?
        I was trying to dereference Null Pointers before it was cool.

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #29 on: September 17, 2009, 04:41:19 PM »
        A test file. It says "Hello World". But it says connection closed by the host.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: Problem with FTP
        « Reply #30 on: September 17, 2009, 05:25:03 PM »
        So wouldn't that be the first clue that the school has locked down FTP access to any server ...or am i missing a minute detail not yet provided ? ?

        I thought you said you were good in another Post and laughed at all the script kiddies...

        " Anyone who goes to a psychiatrist should have his head examined. "

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #31 on: September 17, 2009, 05:35:19 PM »
        THIS ISN'T AT SCHOOL! I said that the script was to test if the host works properly under normal conditions. Aparently not.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: Problem with FTP
        « Reply #32 on: September 17, 2009, 07:41:56 PM »
        A test file. It says "Hello World". But it says connection closed by the host.

        I don't see any filename specified in the batch file...
        I was trying to dereference Null Pointers before it was cool.

        mroilfield



          Mentor
        • Thanked: 42
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 11
        Re: Problem with FTP
        « Reply #33 on: September 17, 2009, 11:48:46 PM »
        THIS ISN'T AT SCHOOL! I said that the script was to test if the host works properly under normal conditions. Aparently not.

        You may not be doing this at school right now but according to the below quote taken from reply #19 you do plan on using this at school.

        Quote
        There is currently no rule against using a computer to communicate to an other computer. And this was at home. I want to make sure it works before I check it at school to see if its blocked.

        If you want to see if it is blocked at school ask the teacher if it is blocked. If they don't or wouldn't know you can turn this into a class project to see who can write the batch file to find out. Heck if you get the right teacher you might even be able to get extra credit for it.

        If you don't want to bring this up to the teacher then you need to give us a good reason why as it sounds like you are trying to do something you shouldn't be.
        You can't fix Stupid!!!

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #34 on: September 18, 2009, 08:25:44 PM »
        @echo off
        :loop
        cls
        echo open>C:\schoolchatdatar.oti
        echo USERNAME>>C:\schoolchatdatar.oti
        echo PASSWORD>>C:\schoolchatdatar.oti
        echo get test.txt>>C:\schoolchatdatar.oti
        echo bye>>C:\schoolchatdatar.oti
        pause
        ftp -i -s:C:\schoolchatdatar.oti 0catch.com
        pause
        del C:\schoolchatdatar.oti
        type test.txt
        rem The above confirms that the FTP is working correctly and the file exists.
        pause
        goto loop


        That's the code I started with. I haven't even started my real code because I need this to work first.
        Try reading the bolded text.

        Mroilfield, nice idea. I would do that if the teachers knew how to find out what sites are blocked without checking by hand. I also don't have a comtech course this year  :-\, nor do I have a death wish. I don't know about highschools you went to, but here, if you're smart, you only show it on tests. Or else.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        mroilfield



          Mentor
        • Thanked: 42
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 11
        Re: Problem with FTP
        « Reply #35 on: September 19, 2009, 12:30:18 AM »
        Try reading the bolded text. 

        How silly of me to not trust what you are trying to do just because you named a txt file "Test" ::)

        I would do that if the teachers knew how to find out what sites are blocked without checking by hand.

        Once again here is your own reference to the fact that you are tying to circumvent something that you think might be blocked at school.

        Here is a little educational fact for you:

        If the school has it blocked then they don't want you to use it. Hence any attempt to get around it would be violating school policy.
        You can't fix Stupid!!!

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Problem with FTP
        « Reply #36 on: September 19, 2009, 08:09:29 AM »
        If it is blocked, and the host works normally, then I would use it outside of school, which would be fine too. I'm trying to find out if the host works properly.

        I don't see any filename specified in the batch file...
        This was why I said read the bolded text, not to you mroilfield.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.