Topic "Copy folder using SFTP"

Author Message
Some ssh user

Guest


Hello,

I have directory tree like:
-a
--f
---z.txt
-b
--f

When I'm trying to copy a/f to b (using SFTP session) then I've got structure like:

-a
--f
---z.txt
-b
--f
---f
----z.txt

f should be child of b, not b/f. (Copying many folders in the same time results b/f/f, b/g/g, b/h/h etc.).

I hope this is easy to understand Wink

This is nothing extremely annoying but a little troublesome.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
How specifically are you copying a/f to b? Can you also attach a session log file showing that?
_________________
Martin Prikryl
Some ssh user

Guest


Ctrl + drag & drop - "f" to "b".

Directory "fa" was copied ok (when "b/fa" doesn't exist), but "f" was copied as "b/f/f" (In this case I'm expecting merge of directories). This can be problem with "cp" command in ssh, but I think that you can do something anyway...

Some lines of logs:

Code:
. 2014-09-02 08:55:57.917 Copying file "/home/user/domains/domain.pl/test/a/f" to "/home/user/domains/domain.pl/test/b/f".
. 2014-09-02 08:55:57.917 Copying file on command session.
[...]
> 2014-09-02 08:55:57.918 [Shell] cp -p -r -f "/home/user/domains/domain.pl/test/a/f" "/home/user/domains/domain.pl/test/b/f" ; echo "WinSCP: this is end-of-file:$?"



Code:
. 2014-09-02 09:04:40.463 Copying file "/home/user/domains/domain.pl/test/a/fa" to "/home/user/domains/domain.pl/test/b/fa".
. 2014-09-02 09:04:40.473 Copying file on command session.
[...]
> 2014-09-02 09:04:40.517 [Shell] cp -p -r -f "/home/user/domains/domain.pl/test/a/fa" "/home/user/domains/domain.pl/test/b/fa" ; echo "WinSCP: this is end-of-file:$?"





By the way, can you use "rm -rf" to remove whole directory when connected to ssh? This will be much faster for many small files or sub-directories...

Thanks!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
OK, I see. It would help if WinSCP used -T switch. But I'm not sure is it is supported by all *nix systems.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
This issue has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=1217
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License