IFTP "/S" Option

Dec 2, 2008
212
2
Canada
#1
I have not been able to determine how the "/S" switch works for IFTP.

I successfully open a connection using IFTP and then start send commands using the "/S". The Help for the command says the following:

/S Allows you to send commands directly to an FTP server. The connection must have already been opened by a previous IFTP command.

So I tried:

iftp /S ls

This yielded:

TCC: [11001] Host not found "ls"
And I tried:

iftp /S verbose on

This yielded:

TCC: [11004] Valid name, no data record (check DNS setup) "verbose on"
After using both these commands the connection is disconnected as well.
So how does the "/S" option work?
 

rconn

Administrator
Staff member
May 14, 2008
10,582
97
#2
The best rule of thumb is that if you don't know why you would /S, then you definitely should not be using /S!

/S is intended for sending configuration options to the FTP server, not for executing commands on the remote system. Exactly what options are valid depends on what FTP server software you're running.
 
Dec 2, 2008
212
2
Canada
#3
If I connect using IFTP

Then I do:

cd ftp:\Test

This will change the directory to Test on the ftp connection. This works
but isn't this the same as:

IFTP /S cd /Test

or

IFTP /S cd Test


This doesn't work.​
 

rconn

Administrator
Staff member
May 14, 2008
10,582
97
#4
No, it is definitely not the same. In the first example, you're changing the default directory for your session on the FTP server. In the second example, you're telling your FTP server to set its internal configuration option "cd /Test".

I don't know of any FTP server that will take a "cd" as an internal configuration option.

If you tell me exactly what you want to do with /S (i.e., that you can't do with something like "cd ftp:\Test"), and exactly what FTP software is running on your server, I can provide a better answer.
 
Dec 2, 2008
212
2
Canada
#5
ftp> help
Commands may be abbreviated. Commands are:

! delete literal prompt send
? debug ls put status
append dir mdelete pwd trace
ascii disconnect mdir quit type
bell get mget quote user
binary glob mkdir recv verbose
bye hash mls remotehelp
cd help mput rename
close lcd open rmdir


When it came to commands this is what I thought was available. I would probably use "trace", "verbose", "debug", etc. Anything to help with connection issues.