User avatar
marine_hm
Posts: 82
Joined: Tue Mar 07, 2017 4:27 pm

Can I copy a file on the Pi Zero W to my hard drive.

Fri May 05, 2017 11:25 pm

I created a file in scratch on my Pi Zero W. The Pi is for a project that is almost complete. So now I want to copy the file I created with my Grand Daughter onto my laptop and maybe onto another Pi later. Suggestions!!! ?

W. H. Heydt
Posts: 11491
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Can I copy a file on the Pi Zero W to my hard drive.

Fri May 05, 2017 11:49 pm

You've got two issues here. The first one is simple.... Can you copy to file to the laptop....Yes. I generally do that with pscp from the Windows system (there are many other solutions as well, but I'm an *old* command line user).

The second question is...Will a scratch file created on a Pi run in Scratch on a Windows (I presume) laptop. I can't help you with that one. My grandson does some work in Scratch, but I set him up with his own Pi, so this issue doesn't come up.

User avatar
marine_hm
Posts: 82
Joined: Tue Mar 07, 2017 4:27 pm

Re: Can I copy a file on the Pi Zero W to my hard drive.

Sat May 06, 2017 12:20 am

Thank you for the ray of hope. To clarify, I do not want to use the scratch file on my laptop just pull it from the Pi and save it to my laptop until I can get another Pi Zero W. Then, when I have it up and running, I can move it back over to the new Pi Zero W.

Please enlighten me how to do that. Can I do it via PUTTY? I've connected to it via PUTTY

klricks
Posts: 6793
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Can I copy a file on the Pi Zero W to my hard drive.

Sat May 06, 2017 1:17 am

marine_hm wrote:Thank you for the ray of hope. To clarify, I do not want to use the scratch file on my laptop just pull it from the Pi and save it to my laptop until I can get another Pi Zero W. Then, when I have it up and running, I can move it back over to the new Pi Zero W.

Please enlighten me how to do that. Can I do it via PUTTY? I've connected to it via PUTTY
Use a web based email account and email the file to yourself.

RealVNC which is included in Raspbian Jessie Pixel has a built in file transfer tool...... either direction.

Many other ways.. network share etc.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Can I copy a file on the Pi Zero W to my hard drive.

Sat May 06, 2017 3:10 am

marine_hm wrote:Can I do it via PUTTY? I've connected to it via PUTTY
pls look in the windows directory where PUTTY.EXE is,
there is also the PSCP.EXE you read about in above post from W. H. Heydt,
the putty secure copy client
but it is a command line thing.
http://the.earth.li/~sgtatham/putty/0.6 ... pter5.html

if you want a nice window tool upgrade from PUTTY to https://www.bitvise.com/ssh-client

pi_everalm
Posts: 33
Joined: Thu Apr 20, 2017 11:44 am

Re: Can I copy a file on the Pi Zero W to my hard drive.

Sat May 06, 2017 11:11 am

If command line copying isn't your thing and your happier with a graphical interface, I prefer Bitvise's SSH client over Putty for a Windows client for both SSH and SFTP.

https://www.bitvise.com/ssh-client

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Can I copy a file on the Pi Zero W to my hard drive.

Sat May 06, 2017 11:35 am

Other graphical options include FileZilla and WinSCP.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

alphanumeric
Posts: 2310
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Can I copy a file on the Pi Zero W to my hard drive.

Sat May 06, 2017 12:19 pm

I often copy python files to from my Pi's. I just plug a (fat32 formatted) USB thumb drive in and copy it to that. Then plug that into my Windows PC and copy the file with explorer.

On occasion I've also just put the Pi's Micro SD card in a USB card reader, and then plugged that into one of my other Pi's to get the file, or copy a new version to it. Works in a pinch. Windows can't see one of the partitions on the card (the one where my file is) so I use my other Pi.

I often edit my python files on my PC. I don't run them as they are written for my sense hat and they would just error out if run on my PC.

W. H. Heydt
Posts: 11491
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Can I copy a file on the Pi Zero W to my hard drive.

Sat May 06, 2017 5:57 pm

marine_hm wrote:Thank you for the ray of hope. To clarify, I do not want to use the scratch file on my laptop just pull it from the Pi and save it to my laptop until I can get another Pi Zero W. Then, when I have it up and running, I can move it back over to the new Pi Zero W.

Please enlighten me how to do that. Can I do it via PUTTY? I've connected to it via PUTTY
As you can see...there are a lot of ways to do this. The PuTTY releted tool, pscp would be the following...

pscp [email protected]<IP addresss or <hostname>.local>:/home/pi/.../<filename> .

That assumes that you are (on the Windows side) in the directory that you want to hold the file in. Otherwise, replace the '.' with the path (relative or absolute) to where you want it to go. For instance, on my desktop system I would put it in something like i:\rpi\python (drive i: being my data drive--2TB spinning rust--as opposed to c: the boot drive, 256GB SSD). In order to use the <hostname>.local syntax and not need to know the IP address of the Pi, Windows needs to have Bonjour installed.

thegnnu
Posts: 157
Joined: Thu Oct 18, 2012 7:07 pm
Location: Bristol

Re: Can I copy a file on the Pi Zero W to my hard drive.

Sat May 06, 2017 7:27 pm

I use a program called "winscp" this will also load putty it uses ssh so a log in with password is used.
You can set it up to use a explorer window looking like windows 7 with drag and drop using right click of mouse.
As I do timelapse it is very easy to tag a thousand files and just drag to a window on the left side this is your hard disk folders.Putty also give a command line.
Been using it since the first PII came out.
have a look here https://winscp.net/eng/index.php
TerryR

Return to “Beginners”