Archived

This topic is now archived and is closed to further replies.

bishop_pass

Scripting automated downloads every night

Recommended Posts

Let's say I have a Web account. I am allowed a certain amount of bandwidth every month. I load new files up to it everyday. I need to then setup a client computer. The client computer will at some predetermined time during the night connect and download all the new files. For simplicity, the new files will be in a new directory named with today's date. I want an easy scripting language which will make this really simple for me to setup. Is there such a thing? Python maybe? I really have no idea. I'm more a C guy and a graphics person. Remember, I want it to be simple. (like 4 lines of scripted code written in a language designed to do that sort of thing.) Any suggestions? ___________________________________
Edited by - bishop_pass on February 18, 2002 2:07:27 PM

Share this post


Link to post
Share on other sites
i apologize if i am way off base here, but if that is the extent of what you want to do with it, it might be simpler to hard-code a function to download the files from the website (maybe with an INI file or something to tell it when and at what IP address) than to learn a new scripting language and get it to work in your program.

Share this post


Link to post
Share on other sites
Learning a new scripting language like, say Python takes about 30 minutes if you know where and how to install it and invoke it. Then it is just a matter of taking an example of how to grab files off a website using built in functions to do that. The idea is to find a scripting language with built in support for that type of thing.

The idea here is for somebody to point me to a very simple solution if they are aware of it, so I don''t spend three days researching it.

And it doesn''t need to be embedded in any other application. It just needs to be run every night.

Share this post


Link to post
Share on other sites
Ha!

I found my Python book. I don''t program in Python, but I can cobble something together if I have too. This looks pretty easy.

data = urllib.urlopen(url).read()

where url is a string of the internet address of the file you wish to download.

Share this post


Link to post
Share on other sites
i apologize for trying to help out with an alternate (and in my opinion simpler) solution to the problem that you explicitly stated.
i will not happen again :p

btw - it might take "30 minutes to learn a new scripting language", but it took you 3-1/2 hours to find your book, and as of yet you haven''t received ANY other answers than mine.

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
For simplicity, the new files will be in a new directory named with today''s date.

This complicates things rather than simplifies them. If you had them in a directory called "updates" or something you wouldn''t have to download from a different directory each night.

And why do you need a scripting language? Most decent ftp programs let you do such things. For example you could schedule

ncftpget -uusername -ppassword your.host.here /path/updates/* local/dir/

every night.

Share this post


Link to post
Share on other sites
quote:
Original post by sQuid
ncftpget -uusername -ppassword your.host.here /path/updates/* local/dir/

every night.


Well, then that''s why I''m here asking people like you. If you would kindly point me to the ftp software in question, and maybe also provide a simple way of sorting those files in ''updates'' so I only get the ones which are new as of today, I''ll be happy.

Share this post


Link to post
Share on other sites
For windows, you might want to use something like getright or wget and use the 'scheduled tasks' dialog in the control panel to launch the download at a predefined time. For UNix I think squids method is quite good ! :-)
to sort, simply 'view by date'. Am I being too simplistic ?
Bishop : I like your pictures. What kind of camera equipment do you use ?

Edited by - behemoth on February 19, 2002 5:55:05 AM

Share this post


Link to post
Share on other sites
quote:
Original post by behemoth
For windows, you might want to use something like getright or wget and use the ''scheduled tasks'' dialog in the control panel to launch the download at a predefined time. For UNix I think squids method is quite good ! :-)
to sort, simply ''view by date''. Am I being too simplistic ?
Bishop : I like your pictures. What kind of camera equipment do you use ?


Thanks for the info. I''ll check it out.

About my photography: go to this recent thread at http://www.gamedev.net/community/forums/topic.asp?topic_id=78931 I started about photography and cameras. The thread is only about a week old, so revive it and we can discuss more if you want.

___________________________________

Share this post


Link to post
Share on other sites