Post Reply 
Raspberry Pi headless question
27-02-2021, 17:44 (This post was last modified: 27-02-2021 17:44 by simbun.)
Post: #7
RE: Raspberry Pi headless question
(27-02-2021 16:49)stumpi Wrote:  Hi Sibun,

Working from the Raspberry Pi Foundation site I have been trying to use the following example command.
scp myfile.txt pi@192.168.1.3:
I thought this was too simple, as there is no drive:\path. Following your advice I have now tried the following commands.
scp drive:\path\filename user@hostname:
scp drive:\path\filename user@IP address:
neither of these work, could you clarify if I should use 'hostname' or 'IPaddress' and tell me what 'target/path' should be? Sorry I am not getting this but many thanks for your help.

scp "drive:\path\filename" "user@host:/target/path/"

Sorry, you were supposed to substitute everything apart from "scp", "@" and ":" for whatever applies to your situation :-)

Assuming you've just installed Raspberry Pi OS I'm assuming you're logging in as the user Pi.
Am I right in thinking that your Pi server is at 192.168.1.3?
In which case, assuming you're already in the directory of the local file that you want to upload i.e. "dir /B myfile.txt" returns myfile.txt:
Code:
scp myfile.txt pi@192.168.1.3:
Should upload myfile.txt to the home directory (/home/pi) of the user pi on the server at 192.168.1.3

If you're not in the directory of myfile.txt you'd use:
Code:
scp "c:\downloads\myfile.txt" pi@192.168.1.3:
Or wherever "myfile.txt" is located.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Raspberry Pi headless question - simbun - 27-02-2021 17:44

Forum Jump:


User(s) browsing this thread: 1 Guest(s)