Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Conflicted Output from IFTP with No Arguments

Jun
760
16
Two conflicting things now happen when IFTP is run with no arguments. As previously, it outputs the name of the server to which there is a current connection. However, now that there is a command dialog, it also opens the dialog.

In a script, I am trying to run set server=%@execstr[*iftp] to get the name of the current server. It does that, but it also opens the command dialog, which I do not want. Is there any way to prevent the dialog from opening?
 
I just discovered that I can run the command IFTP /P1, which results in the currently connected server being output, so the following command gets the data into the variable without popping up the dialog.

Code:
set server=%@execstr[*iftp /p1]

Of course, that command does perform an action as well, but since I'm using passive mode anyway, I can live with it.

Perhaps the IFTP command should not invoke the dialog unless one specifically asks for it using the /= option. Alternatively, a new option could be added that would return information about the connection (and it could include more possibilities than just the server name).
 
It looks different here. All the way back to v24, it opens the dialog and does not output the current server name.
 
And when I connect as (ftp) administrator I get a less than satisfactory directory listing. In the server's configuration, my home directory is specified as \ (just a backslash). The seven directories below are probably my seven drives (including SUBSTs).

Code:
v:\> dir ftp:

 Directory of  ftp://vefatica.net/*

1980-01-01  00:00         <DIR>
1980-01-01  00:00         <DIR>
1980-01-01  00:00         <DIR>
1980-01-01  00:00         <DIR>
1980-01-01  00:00         <DIR>
1980-01-01  00:00         <DIR>
1980-01-01  00:00         <DIR>
                   0 bytes in 0 files and 7 dirs
 
I see that you are right. I did not realize that when I was exiting the dialog, the command iftp /p1 was being executed, which resulted in the display of the current connection.

The help says the following: "Note: If you enter IFTP with no parameters while a connection is active, the current server name and directory will be displayed." Elsewhere it says: "If you don't enter any arguments, IFTP will display its command dialog."

There is apparently a bug in the code, since, as you pointed out, the current server name is not displayed when no parameters are specified. And the command dialog should open only when there is no active connection.
 
Well, perhaps the intention, according to the help file, is to display the current connection if there is one or the dialog if there is none (though the second statement in help does not say that the dialog will open only when there is no current connection).

The help also does not say that the currently connected server information will be reported for other options, such as /p, /r, /t
 
I don't use those dialogs. Are there other commands that present a dialog when you don't ask for it?
 
Back
Top