Click to See Complete Forum and Search --> : FTP shell script


Hadiz
05-30-2004, 08:11 PM
I'm trying to create a script that will open FTP, and browse through several different remote folders, however only download files that have a datestamp of X day or newer. Anyone have any suggestions?

maccorin
05-31-2004, 10:56 PM
echo "mget *.blah" | ncftp -u <user> -p <passwd> <host>

knute
05-31-2004, 11:30 PM
wget already has that sort of functionality if I recall correctly.

maccorin
05-31-2004, 11:34 PM
Originally posted by knute
wget already has that sort of functionality if I recall correctly.

probably, but i was too lazy to check the man page before i answered

Hadiz
06-03-2004, 01:42 AM
Pardon my extreme noob-ness, I was browsing through the wget man, and I do not see a relative switch or how I could put it to use. The only relative thing I found was the timestamp switch '-N'.

Thanks again

knute
06-03-2004, 01:58 AM
Take a look at the acclist or the rejlist options of wget.

It'll let you specify patterns to either accept or reject. So then you set it up to either accept those newer than date+-X or to reject those that are older than date+-X.

I hope that made sense. Not really sure how to impliment it right now, but it may help.

Hadiz
06-03-2004, 02:01 AM
Thanks, I'll give it a shot.