Jump to content
Compatible Support Forums
Sign in to follow this  
GHz

Need Help with FTP.EXE

Recommended Posts

I'm trying to use FTP.EXE to send and get files with spaces in them. For instance, it works fine with a file such as "myfile.txt" but fails with "my file.txt". Does anyone know how to get this working? I tried using the 'literal' command with 'RETR my file.txt' but that seems to hang the software. I am quite aware that I could be using another FTP client, but I need FTP.EXE to work because I've tied it into my program. If you don't know how to solve the problem with FTP.EXE, suggesting another command-line program would be useful. Thanks in advance.

 

GHz

http://www.planetquake.com/vortex

ghz@planetquake.com

Share this post


Link to post
Quote:
I'm trying to use FTP.EXE to send and get files with spaces in them. For instance, it works fine with a file such as "myfile.txt" but fails with "my file.txt". Does anyone know how to get this working? I tried using the 'literal' command with 'RETR my file.txt' but that seems to hang the software. I am quite aware that I could be using another FTP client, but I need FTP.EXE to work because I've tied it into my program. If you don't know how to solve the problem with FTP.EXE, suggesting another command-line program would be useful. Thanks in advance.

GHz
http://www.planetquake.com/vortex
ghz@planetquake.com


Try putting the file name in quotes (try "my file.txt" first and then 'my file.txt')

Share this post


Link to post

Homeboy has got it right. Anywhere there would be a spcae, put %20 instead.

Share this post


Link to post

Yes, my application creates the script files dynamically based upon user input. If you're really curious, I'm using the FTP as a subsystem to transfer character data to and from my Quake 2 server to a master FTP database. This allows players of my Q2 RPG mod to play their character from any server, provided they have my special software (and FTP.EXE of course!).

 

Thanks for the help guys, I'll try out your suggestions tonight.

 

GHz

http://www.planetquake.com/vortex

ghz@planetquake.com

Share this post


Link to post
Quote:
Yes, my application creates the script files dynamically based upon user input. If you're really curious, I'm using the FTP as a subsystem to transfer character data to and from my Quake 2 server to a master FTP database. This allows players of my Q2 RPG mod to play their character from any server, provided they have my special software (and FTP.EXE of course!).

Thanks for the help guys, I'll try out your suggestions tonight.

GHz
http://www.planetquake.com/vortex
ghz@planetquake.com


Why don't you just write the ftp into the software. I don't know what kind of language you are using but I doubt it is that hard to do. You could probably find a library out there with all the socket based programming done for you. It would take away the need for FTP.exe. Just something to think about, especially if my above suggestion doesn't work.

Share this post


Link to post
Quote:
Quote:
Quote:
Yes, my application creates the script files dynamically based upon user input. If you're really curious, I'm using the FTP as a subsystem to transfer character data to and from my Quake 2 server to a master FTP database. This allows players of my Q2 RPG mod to play their character from any server, provided they have my special software (and FTP.EXE of course!).

Thanks for the help guys, I'll try out your suggestions tonight.

GHz
http://www.planetquake.com/vortex
ghz@planetquake.com


Why don't you just write the ftp into the software. I don't know what kind of language you are using but I doubt it is that hard to do. You could probably find a library out there with all the socket based programming done for you. It would take away the need for FTP.exe. Just something to think about, especially if my above suggestion doesn't work.


Warning him ahead of time: I wrote an FTP client...

I found out that downloading stuff is simpler than uploading them, no question... I got by it & around some hassles I had with it (most all of them I think with MOST ftp servers, but not all), but was headache & VERY frustrating!

In fact, the MOST frustrating problem I have ever run into programming actually!

(This problem boggled my mind for a good 1/2 year in fact, but I wrote it from scratch & did ALOT of porting of the C/C++ code for it to Delphi... I solved it with time & hassle, but it was a PAIN!)

* That's why I was wondering if he was scripting FTP.exe itself...

smile

APK

P.S.=> BUT, VG does have a point: I think that WSFTP's sourcecode is up online & freely available too... no joke! Trick is, he may not be used to the C/C++ code I believe it is written in... apk


I have written a simple http client/server in c. There is pleanty of documentation and source code out there if you wanted to go that way as well. I doubt ftp is much different.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×