G-Stress Posted December 20, 2007 Share Posted December 20, 2007 Is it possible to download files via telnet? I have 2 machines that I tried testing this out on setup. I telnet via cmd line into box 2 then I wasn't able to find any useful info on downloading files with telnet so I ftp'd via cmd line back into box 1 and tried to copy/download a directory but kept getting error's that the dir didn't exist. ftp> mget C:Documents and SettingsUserMy DocumentsFiles ftp> mget C:Documents and SettingsUserMy DocumentsFiles*.txt Trying to download files from box 2 to box 1 It's as if when I ftp it no longer see's anything on box 2 it only see's file's on box 1? I tried (put, mput, get) also just to see what would happen and still got unknown dir/file errors. Trying to do everything via cmd line, both machines XP Pro SP2. Quote Link to comment Share on other sites More sharing options...
Deveant Posted December 20, 2007 Share Posted December 20, 2007 haha u could cheat, make a shared folder on PC1, telnet into PC2, and just use 'copy'. ie: make share folder "share" on PC1 telnet PC2 copy bob.txt PC1share Quote Link to comment Share on other sites More sharing options...
G-Stress Posted December 20, 2007 Author Share Posted December 20, 2007 hmmm... yea I could do that and actually I didn't even think about that, but that would kinda defeat the purpose;) Quote Link to comment Share on other sites More sharing options...
digip Posted December 20, 2007 Share Posted December 20, 2007 FTP has to be a service or daemon on both machines in order for ftp to work between the two of them. Quote Link to comment Share on other sites More sharing options...
cooper Posted December 20, 2007 Share Posted December 20, 2007 Oh man. In plain-text FTP the backslash is the escape character, and you need to escape spaces. So you should've done something like: mget /C:/Documents and Settings/User/My Documents/Files/*.txt Note that most of this is server-dependant. Try CDing to root and then running LIST. See where on the system you are and take it from there. Alternatively, on UNIX there's the "tee" program, which basically sits between you and a running program, reading the program's output and writing it to a local file aswell as sending it on to STDOUT. So you could tee your telnet session, log on, cat some lengthy file, log off, edit the resulting file to cut off the bits prior to and after the catting of the file, and you'll have the file. Note that this will probably give very WRONG results when tried with binary files. Quote Link to comment Share on other sites More sharing options...
Sparda Posted December 20, 2007 Share Posted December 20, 2007 Alternatively, you could stop using such an archaic protocol and move on to SSH which does offer file transfers. Quote Link to comment Share on other sites More sharing options...
G-Stress Posted December 20, 2007 Author Share Posted December 20, 2007 Interesting... so this can be done. All the posts I read googling most threads basically said it couldn't even be done, but I knew there had to be some way. @ Sparda, Yes. SSH is next to try out the same scenario. @ Cooper, So basically I was on the right path with just the wrong syntax? I'm not "too familiar" with cmd line ftp and telnet which is one reason for my wanting to get this working. If I... Workstation1--> telnet> workstation2 Workstation2--> ftp> workstation1 then use the above syntax I should be able to get this working? I'll give this a shot sometime tonight and post back. Thanks guys. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.