Community
    • Login

    Send the file to the server via tftp

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    14 Posts 2 Posters 12.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Claudia FrankC
      Claudia Frank
      last edited by

      Hello,

      TFTP isn’t part of Notepad++, so must be 3rd party program.
      How do you exactly execute your tftp program?
      Using F5 or NppExec? Something different?

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • Максим ДунаевМ
        Максим Дунаев
        last edited by

        I use NppExec, with following code:

        1. C:\Windows\System32\TFTP.EXE 192.168.1.4 put C:\1\1.txt
        2. tftp.exe 192.168.1.4 put C:\1\1.txt
          all item show error:
          C:\Windows\System32\TFTP.EXE 192.168.1.4 put C:\1\1.txt
          CreateProcess() failed with error code 2:
          Не удается найти указанный файл.
          (Can not find the file specified)

        But next code working
        ping 192.168.1.4

        Claudia FrankC 1 Reply Last reply Reply Quote 0
        • Claudia FrankC
          Claudia Frank @Максим Дунаев
          last edited by

          @Максим-Дунаев
          so question would be, does this run if you use a normal cmd?
          Where does tftp.exe come from? Is the order of arguments correct?

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • Максим ДунаевМ
            Максим Дунаев
            last edited by

            When using the Windows console it works fine.
            tftp.exe is a standard Windows tool as well as ftp,ping.

            Claudia FrankC 2 Replies Last reply Reply Quote 0
            • Claudia FrankC
              Claudia Frank @Максим Дунаев
              last edited by

              @Максим-Дунаев,

              tftp.exe is a standard Windows tool as well as ftp,ping.

              Yes, I know that MS has one but there are freeware tools also available
              which then differ in how to run the client and which features are available.
              We used to use ms tftp but because of the non existance of -b switch and
              the restriction in file size we changed to another product from cisco.
              You know, that there is normally a fourth parameter called destination,
              which, when skipped, will be assumed as the same as the third parameter, so in your case the remote
              computer needs to understand C:\1\1.txt?

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank @Максим Дунаев
                last edited by Claudia Frank

                @Максим-Дунаев

                just tried it with a local tftp server

                tftp.exe 1.1.1.1 put c:\1\1.txt
                Process started >>>
                transfer successful: 10 bytes in 1 second, 10 bytes/s
                <<< Process finished. (Exit code 0)
                ================ READY ================

                1 Reply Last reply Reply Quote 0
                • Максим ДунаевМ
                  Максим Дунаев
                  last edited by

                  Oh sorry in the previous message,i showed not incorrect code.
                  This is what happens if perform code in the console NppExec:

                  C:\Windows\System32>tftp.exe -i 192.168.1.4 put C:\1\1.txt
                  tftp.exe -i 192.168.1.4 put C:\1\1.txt
                  “tftp.exe” не является внутренней или внешней
                  командой, исполняемой программой или пакетным файлом.
                  ( “tftp.exe” not an internal or external command, operable program or batch file.)

                  if you specify the full path to tftp.exe it does not change nothing.
                  I look through the analyzer (Wireshark) on request packets and see what they are missing.

                  Claudia FrankC 1 Reply Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank @Максим Дунаев
                    last edited by

                    Hello Максим-Дунаев,

                    can you make a screenshot of your NppExec Execute dialog window and upload to e.g. imgur?

                    Cheers
                    Claudia

                    1 Reply Last reply Reply Quote 0
                    • Максим ДунаевМ
                      Максим Дунаев
                      last edited by

                      http://imgur.com/prsBB2G Execute dialog
                      http://imgur.com/V2XJJBF Used NppExec console

                      1 Reply Last reply Reply Quote 0
                      • Claudia FrankC
                        Claudia Frank
                        last edited by

                        This is strange, I assume the error is still
                        “tftp.exe” not an internal or external command, operable program or batch file.

                        Can you check which version of tftp.exe you use?
                        Goto C:\windows\System32
                        Right-Click on tftp.exe and press version tab.

                        You are using windows 7 or is it windows server 2008?
                        x86 or x64?

                        Cheers
                        Claudia

                        1 Reply Last reply Reply Quote 0
                        • Максим ДунаевМ
                          Максим Дунаев
                          last edited by

                          I use windows 7.
                          http://imgur.com/riV5zp5

                          Claudia FrankC 1 Reply Last reply Reply Quote 0
                          • Claudia FrankC
                            Claudia Frank @Максим Дунаев
                            last edited by

                            Hello @Максим-Дунаев,

                            you are right, on windows7 I see the same issue as you. tftp isn’t found. The reason is the file system redirection api
                            introduced in vista. What you can do, to force that system32 directory is used and not being redirected to syswow64,
                            is to use the sysnative alias. So your NppExec command must look like this

                            c:\windows\Sysnative\tftp.exe 192.168.1.4 put C:\1\1.txt
                            

                            I have tested this on my Winows 7 and it works.

                            c:\windows\Sysnative\tftp.exe 192.168.178.26 put C:\1\1.txt
                            Process started >>>
                            Transfer successful: 9 bytes in 1 second(s), 9 bytes/s
                            <<< Process finished. (Exit code 0)
                            ================ READY ================
                            

                            Cheers
                            Claudia

                            1 Reply Last reply Reply Quote 0
                            • Максим ДунаевМ
                              Максим Дунаев
                              last edited by

                              Great, thank you for your help.

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              The Community of users of the Notepad++ text editor.
                              Powered by NodeBB | Contributors