Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How to remotely get pictures< Next Oldest | Next Newest >
danielp Offline





Group: Members
Posts: 57
Joined: May 2007
Posted: Oct. 31 2007,14:20 QUOTE

Hi all,

This is not DSL specific, but since I'm a Linux newbie, I'd like to learn how to do this. I would like to:
-connect to a website or FTP site every day (cron?) and see if there are new pictures in a specific directory. If yes, then I download them to the DSL box and delete them remotely.

I can use either a webspace or an FTP space; whatever is more convenient.

Which programs/scripts should I use for this task? Thanks for your help!
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 31 2007,15:02 QUOTE

You can use cron, and ftp.

- save your ftp commands in a file.  The logic in this depends on how you set up your new pictures directory.  It'd be much easier if you just have a dedicated directory for that, so you can easily download all, then delete all (i.e. with globbing, use mget and mdelete)
- create a shell script to uses them (i.e. with `ftp < myftpcommands` )
- add an entry to cron that runs your shell script at whichever times

note: If you think its not specific to DSL, why the post in a DSL specific section? :P
Back to top
Profile PM 
danielp Offline





Group: Members
Posts: 57
Joined: May 2007
Posted: Oct. 31 2007,16:03 QUOTE

I posted here because I will be using DSL for the Digital Picture Frame. I think it's not DSL specific because I guess it is common to all linux scripting, no? Should I ask on another forum?

If I understand you well, it's possible to write a script that will "simulate" typing ftp commands. Could you give me an example? Like how to login in first, list remote dir and see if there are any files there? Thanks!
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Oct. 31 2007,16:37 QUOTE

I'll try.

The command "ftp < mycommands" will take all input from the file "mycommands". So here's a sample of what to put into that:
Quote
user
password24456
ls


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
newOldUser Offline





Group: Members
Posts: 241
Joined: Oct. 2004
Posted: Oct. 31 2007,16:48 QUOTE

I have found this article to be of use in the past:

http://w3.linux-magazine.com/issue/59/Automating_FTP.pdf


--------------
======== Note =========
The DSL Forum Search default is 'OR'
If you search for "cat dog" you will get all "cat" posts and all "dog" posts.
If you search for "cat AND dog" you will only find results that contain BOTH "cat" and "dog"
Add '*' for wildcards, " cat* and dog* "
Back to top
Profile PM 
7 replies since Oct. 31 2007,14:20 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: How to remotely get pictures

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code