Author Topic: Sd To Ftp  (Read 1839 times)

gilkyboy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Sd To Ftp
« on: June 17, 2006, 10:35:21 am »
I was wondering if anyone can help me with a problem.  I'm going to visit Germany this summer and am supposed to keep a website going with pictures of our trip.  I'd love it if I could just pop my SD card into my Zaurus and it would automagically FTP them to my school's website.  Can anyone help me out with this task?  Thanks in advance,
     gilkyboy

Ferret-Simpson

  • Hero Member
  • *****
  • Posts: 572
    • View Profile
Sd To Ftp
« Reply #1 on: June 17, 2006, 10:56:02 am »
You'd need a script that ran when you inserted the card. Wouldn't it just be easier to put the card in, go to the console and type "imgsdcardjobbyupload" and have that script upload them?
Cortana: PXA250/Poodle: OZ/GPE 3.4.2RC1
Tycho PXA270/HTC_Universal WM5  .30.107/1.09.00/42.42.P8/1.30.162
HollyWatch: Fossil AU5005 - POS 4.1.2
ATLANTIS: Fujitsu Lifebook T4210 TBPC2005

Tosh256CF, Adlink CF 802.11B, 512KingSD, 128VikSD, CFChiMeiG1GPRS

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Sd To Ftp
« Reply #2 on: June 17, 2006, 05:30:51 pm »
it's pretty easy to have an auto-ftp script. the first clue is to use a file called .netrc - create one in the home directory for user zaurus, and it looks like this:
Code: [Select]
machine ftp.example.com login zaurus password z4uru5change the host, the username and the password appropriately

this makes the "ftp ftp.example.com" automatically login for you.

then you need a script which will ftp all the files for you from the card and then move them to an "old" directory, thus:
Code: [Select]
#!/bin/bash

if [ ! -d  ../old ]; then
    mkdir ../old
fi

cd /mnt/card/imagefolder/new
echo "type i" > /tmp/ftpcommand
ls *.jpg *.JPG | awk '{ "put " $1 }' >> /tmp/ftpcommand
ftp ftp.example.com < /tmp/ftpcommand
mv *jpg *JPG ../old

# end
this is all off the top of my head, but something similar works for me and my webcam.

Paul
« Last Edit: June 17, 2006, 05:42:25 pm by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.