8

I have installed Tftpd32 software in my windows 7 pc. I have running tftp server on my windows pc and tftp home directory has few directories and files. I have to display the tftp servers directories and files from windows command prompt ? How to display the tftp server directories and folders ?

C:\Users\user1>tftp

Transfers files to and from a remote computer running the TFTP service.

TFTP [-i] host [GET | PUT] source [destination]

  -i              Specifies binary image transfer mode (also called
                  octet). In binary image mode the file is moved
                  literally, byte by byte. Use this mode when
                  transferring binary files.
  host            Specifies the local or remote host.
  GET             Transfers the file destination on the remote host to
                  the file source on the local host.
  PUT             Transfers the file source on the local host to
                  the file destination on the remote host.
  source          Specifies the file to transfer.
  destination     Specifies where to transfer the file.


C:\Users\user1>
gmanikandan
  • 475
  • 3
  • 10
  • 16

2 Answers2

8

TFTP is a minimal file transfer protocol that does not provide subcommands to list remote files.

But Tftpd32 has a workaround, it can create a "dir.txt" file for the directory you're accessing. Enable the option in the TFTP settings of Tftpd32. Now when a TFTP client requests the "dir.txt" file, the server will generate and send a file that lists the content of the base directory.

You'll have to use FTP if you want to use more advanced features.

Synck
  • 2,727
  • 22
  • 20
2

You can get "BaseDirectory" of Tftpd32 from tftpd32.ini in the installed directory. (C:\Program Files\Tftpd32). Typically on opening Tftpd32 application, it will open with this directory as the base one. And from a script,

  • Change the directory to the base directory grepped from tftpd32.ini
  • Do a "dir" from that directory, to obtain the list of sub-directories and files.
bugger
  • 21
  • 1