Copying files to Sftp folder via command line or commands?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
kerem
Junior Member
Junior Member
Posts: 26
Joined: 2011-01-27, 18:47 UTC

Copying files to Sftp folder via command line or commands?

Post by *kerem »

Hi

Is there a way to copy selected file to a certain Sftp(existing) directory via command line or command way?

I have the Sftp plugin working well with Sftp servers. What I want is to be able to select a file and copy it to a certain folder on a Sftp server without opening the Sftp tab and browsing to that particular folder.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, Total Commander is an interactive tool only. Maybe you can achieve it with Putty or some other SFTP tool. Does anyone here know such a tool which works on the command line?
Author of Total Commander
https://www.ghisler.com
kerem
Junior Member
Junior Member
Posts: 26
Joined: 2011-01-27, 18:47 UTC

Post by *kerem »

Ghisler thanks for the follow up. I will look into a hack with mix of AHK and Bash I think.
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

PuTTY homepage has command line SFTP/SCP clients (psftp.exe/pscp.exe).
acherem
Junior Member
Junior Member
Posts: 3
Joined: 2020-04-08, 14:59 UTC

Re: Copying files to Sftp folder via command line or commands?

Post by *acherem »

HI guys,
just checking if nothing has changed since this thread was active - still no way to trigger sftp download via command line via the plugin?
Thank you,
Alex
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Copying files to Sftp folder via command line or commands?

Post by *ghisler(Author) »

Why not use the PuTTY SCP client as user Sob suggested?
Author of Total Commander
https://www.ghisler.com
acherem
Junior Member
Junior Member
Posts: 3
Joined: 2020-04-08, 14:59 UTC

Re: Copying files to Sftp folder via command line or commands?

Post by *acherem »

Sure can do this :) we like TC because it one stop shop for heaps of nice features - that's the reason i guess. Thank you for the amazing tool!
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Copying files to Sftp folder via command line or commands?

Post by *Stefan2 »

Sob wrote: 2011-02-08, 18:38 UTC PuTTY homepage has command line SFTP/SCP clients (psftp.exe/pscp.exe).
acherem wrote: 2020-04-09, 12:59 UTC Sure can do this :) we like TC because it one stop shop for heaps of nice features - that's the reason i guess. Thank you for the amazing tool!

But TC can support you utilizing a command line tool by providing parameter for the selected files ,... or like that.
Next you can executed that from own created button or User-defined command plus the possibility to add an keyboard shortcut.




 
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Copying files to Sftp folder via command line or commands?

Post by *nsp »

acherem wrote: 2020-04-09, 12:59 UTC Sure can do this :) we like TC because it one stop shop for heaps of nice features - that's the reason i guess. Thank you for the amazing tool!
AS said TC is driven by the user interaction. I never close my TC window and do many background task, sync,..
I also use a lot of console tools but mostly driven by TC to fill parameter, lists,....
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Copying files to Sftp folder via command line or commands?

Post by *Stefan2 »

Butter bei die Fische!


https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter5.html
So to copy the local file c:\documents\foo.txt to the server example.com as user fred to the file /tmp/foo you would type:
pscp c:\documents\foo.txt fred@example.com:/tmp/foo



With TC use an button like:
Command: "Tools\PuTTY\pscp"
Parameters: %P%N fred@example.com:/tmp/foo
Start path:
Icon: "Tools\PuTTY\pscp"
Tooltip: pSCP selected file to /tmp/foo


May need some adjustment, but basically that's it.



 
acherem
Junior Member
Junior Member
Posts: 3
Joined: 2020-04-08, 14:59 UTC

Re: Copying files to Sftp folder via command line or commands?

Post by *acherem »

Thank you Stefan & Team,
wrote a script with psftp.
Post Reply