GHz 0 Posted April 16, 2003 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
ViolentGreen 0 Posted April 16, 2003 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. GHzhttp://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
GHz 0 Posted April 16, 2003 That's the first thing I tried. Doesn't work GHz http://www.planetquake.com/vortex ghz@planetquake.com Share this post Link to post
adamvjackson 0 Posted April 16, 2003 Did you try including the full path to the filename? Share this post Link to post
ViolentGreen 0 Posted April 16, 2003 OK then. What about using the %20 instead of a space?[/i] Share this post Link to post
duhmez 0 Posted April 16, 2003 Homeboy has got it right. Anywhere there would be a spcae, put %20 instead. Share this post Link to post
GHz 0 Posted April 17, 2003 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
ViolentGreen 0 Posted April 17, 2003 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. GHzhttp://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
ViolentGreen 0 Posted April 17, 2003 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. GHzhttp://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... 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