Send the file to the server via tftp
-
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 -
I use NppExec, with following code:
- C:\Windows\System32\TFTP.EXE 192.168.1.4 put C:\1\1.txt
- 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 -
@Максим-Дунаев
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 -
When using the Windows console it works fine.
tftp.exe is a standard Windows tool as well as ftp,ping. -
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 -
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 ================ -
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. -
Hello Максим-Дунаев,
can you make a screenshot of your NppExec Execute dialog window and upload to e.g. imgur?
Cheers
Claudia -
http://imgur.com/prsBB2G Execute dialog
http://imgur.com/V2XJJBF Used NppExec console -
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 -
I use windows 7.
http://imgur.com/riV5zp5 -
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 thisc:\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 -
Great, thank you for your help.