DennyP
Posts: 4
Joined: Sun Dec 29, 2013 7:47 am

SFTP - Not receiving files from the Pi to my computer of a specific timestamp, how come?

Tue Nov 21, 2017 8:55 pm

Hello all,

I'm trying to set up a SFTP so I can retrieve photos being taken from camera taking photos every 2 minutes for a time lapse.

The default naming of the files are YYYY-MM-DD_HHmm.jpg (year, month, day, hours minute), with other files in the directory as shown:

Image
https://www.dropbox.com/s/5omrbfadumf07 ... 1.png?dl=0

I find that these YYYY-MM-DD_HHmm.jpg files cannot be transferred, however .jpg, 2017.jpg, cam.jpg, camera.sh

Interestingly, I tried to use a dropbox bash script to upload these files into my personal dropbox, however the same YYYY-MM-DD_HHmm.jpg files got rejected!

Ideally I'd like to try to keep a timestamp if I could.....

Was wondering if someone could guide me to fix this problem? If anyone wants more information, I'm happy to provide :),

Kind Regards,
DennyP

User avatar
DougieLawson
Posts: 30416
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: SFTP - Not receiving files from the Pi to my computer of a specific timestamp, how come?

Tue Nov 21, 2017 10:36 pm

Try using:
sftp some.ip.addr.here
cd /somedirectory/somesubdirectory
bin
get 2017-11*\.jpg


That's using a regex to map the filenames.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

sora03
Posts: 118
Joined: Mon Dec 29, 2014 4:11 pm

Re: SFTP - Not receiving files from the Pi to my computer of a specific timestamp, how come?

Thu Nov 23, 2017 12:51 pm

using the sftp command with -p preserves the file's timestamp try to read the manual of the command sftp
$ man sftp
also when trying to copy files you should add quotes

Return to “Troubleshooting”

Who is online

Users browsing this forum: PeterK2 and 60 guests