Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transfer folder using pscp (Putty) from Windows to Linux

Tags:

pscp

Using puttys pscp -r folder\to\copy\* user@server:/path/to/copy/folder/to it only copies the content of path\to\copy\folder\* and does not include the "main" folder which the subfiles and subdirectories are in.

What I need is that the folder itself is also copied such that I get a folder with the same name as the one I copied with the content inside.

I know I just can create a parent-folder for the one I want to copy and parse that as the path\to\copy\folder\* but that is not the case

like image 766
CutePoison Avatar asked Sep 02 '26 03:09

CutePoison


1 Answers

Just use pscp -r folder\to\copy user@server:/path/to/copy/folder/to.

Note that the backslash (\) after the original folder's name needs to be omitted. If you add a backslash, the content of the folder is copied, rather than the folder itself.

like image 67
keineahnung2345 Avatar answered Sep 05 '26 05:09

keineahnung2345



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!