Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using WinSCP to interact with a remote server that supports only SFTP and doesn't allow SSH access.

My interaction involves moving/deleting a subset of files (identified by file names) in a certain directory.

To simplify this, I would typically synchronize [ Remote -> Local ], delete the files locally using the cygwin commandline (so that I can specify a list of file names instead of selecting files in the GUI) and then synchronize [ Local -> Remote ] to push the deletes to remote.

But, now, I want to further simplify the process so I can hand this over to an operations person. I went looking and was delighted to find that WinScp suppords 'commands'.

It would be great if I could enter something like this in the 'Command' field at the bottom in the 'Commander' view of WinSCP:

get queue-queue-from-DLQ-ID-69703273-db51-11e1-ba9f-005056010165 \
    queue-queue-from-DLQ-ID-3d64697a-db51-11e1-b86e-005056010166 \
    queue-queue-from-DLQ-ID-76fdb365-db50-11e1-b78d-005056010164 \
    queue-queue-from-DLQ-ID-76ed3836-db50-11e1-ba9f-005056010165

But when I enter this in the 'Command' field, I get the following error:

Current SFTP-3 session does not support command you request. Separate shell session may be opened to process the command. Do you want to open separate shell session?

Error 1 : enter image description here

When I hit ok, I get the following error:

Error skipping startup message. Your shell is probably incompatible with the applicaiton (BASH is recommended).

Error 2 : enter image description here

The latter one is probably due to the fact that SSH is not supported.

But my question is, since 'get' is an SFTP command, why am I getting the first error? Doesn't WinSCP itself use that command under the covers to support a gui 'copy to local' operation?

How can I configure either WinSCP or the linux box so that I can do what I have shown above?

share|improve this question
    
I guess this answers my question: winscp.net/eng/docs/remote_command Apparently, the 'Command' feature is only supported for SCP. I wonder why WinSCP can't expose a commandline interface for SFTP operations that are generally supported during an sftp interactive session. –  Vijay Ratnagiri Aug 6 '12 at 22:10
add comment

1 Answer

up vote 1 down vote accepted

I guess this answers my question: http://winscp.net/eng/docs/remote_command

Apparently, the 'Command' feature is only supported for SCP.

I wonder why WinSCP can't expose a commandline interface for SFTP operations that are generally supported during an sftp interactive session.

share|improve this answer
    
WinSCP has commandline interface: winscp.net/eng/docs/scripting You just cannot use the commands from the GUI. –  Martin Prikryl Apr 11 '13 at 9:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.