Copy folder using SFTP

Advertisement

Some ssh user
Guest

Copy folder using SFTP

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 ;)

This is nothing extremely annoying but a little troublesome.

Reply with quote

Advertisement

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:

. 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:$?"


. 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!

Reply with quote

Advertisement

You can post new topics in this forum