Need Help with FTP.EXE

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.

Windows Software 5498 This topic was started by ,


data/avatar/default/avatar05.webp

21 Posts
Location -
Joined 2000-05-14
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

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar30.webp

556 Posts
Location -
Joined 2003-03-28
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')

data/avatar/default/avatar35.webp

2172 Posts
Location -
Joined 2002-08-26
Did you try including the full path to the filename?

data/avatar/default/avatar30.webp

556 Posts
Location -
Joined 2003-03-28
OK then. What about using the %20 instead of a space?

data/avatar/default/avatar03.webp

581 Posts
Location -
Joined 2002-04-27
Homeboy has got it right. Anywhere there would be a spcae, put %20 instead.

data/avatar/default/avatar05.webp

21 Posts
Location -
Joined 2000-05-14
OP
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

data/avatar/default/avatar30.webp

556 Posts
Location -
Joined 2003-03-28
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.

data/avatar/default/avatar30.webp

556 Posts
Location -
Joined 2003-03-28
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...



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.