Sample Header Ad - 728x90

scp copies folder but not contents of the folder

1 vote
1 answer
135 views
I have been trying to get this to work for a few days now, but I can't figure it out. I am trying to scp a folder full of .tar files from my Ubuntu-Server Server to my Windows Desktop. I want to push it from my server to my Desktop, because I'd like to automate the process via a bash script. I am using a command like this: scp -r path/to/folder Username@Windowsmachineip:C:/path/to/folder/ When I execute the command, I get the error no such file or directory, but it does create a folder with the name of the folder on my server. What I **can** do is a copy single files, but only if I specify a name for the file on my desktop, like this scp -r path/to/folder/file Username@Windowsmachineip:C:/path/to/folder/file If I try it without the filename at the end, I get the same error. I also tried it with the -p flag, following a suggestion, but that throws the same error. I tried pulling from the Server to my desktop, but get the same error. I also tried sftp which gives this output: dest open "/E:/backup/minecraft/backup_minecraft_24_03_2024_06:01:04.tar": No such file or directory upload "backup/minecraft/backup_minecraft_24_03_2024_06:01:04.tar" to "/E:/backup/minecraft/backup_minecraft_24_03_2024_06:01:04.tar" failed The error I get with scp and -v flag is: scp: debug1: fd 3 clearing O_NONBLOCK Sending file modes: C0666 471111680 backup_minecraft_23_03_2024_22:29:33.tar Sink: C0666 471111680 backup_minecraft_23_03_2024_22:29:33.tar scp: E:/backup/minecraft/backup_minecraft_23_03_2024_22:29:33.tar: No such file or directory Why doesn't this work?
Asked by Tim_Schmock (13 rep)
Mar 25, 2024, 06:15 PM
Last activity: Mar 26, 2024, 11:35 AM