Networking :: How to remotely get pictures



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!

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

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!

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

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

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

Next Page...
original here.