S replied to the topic 'Best way to get images from RPi?' in the forum. 4 years ago

I use a small script run under cygwin on windows 10, typically the day after. It transfers all files created within the last 24h from the imaging folder on the pi. Here it is:

#!/bin/bash

IP=192.168.0.153
user=pi

start0=$(date -d yesterday)
end0=$(date -d now)

start=${1:-$start0}
end=${2:-$end0}

echo Copying files newer than $start and older than $end

files=$(ssh $user@$IP "find Light/ -type f -newermt \"$start\" -not -newermt \"$end\"")

for f in $files; do
    scp $user@$IP:"$f" .
done


Read More...