Prev Previous Post   Next Post Next
Old 19th February 2008, 16:29
bschultz bschultz is offline
Senior Member
Join Date: Jul 2006
Posts: 224
Thanks: 11
Thanked 10 Times in 10 Posts
Default wget question

I've got two questions on automating a bunch of mp3 downloads. I need to download five mp3's per week. The problem is the files are placed in a directory based on the week of the year. So, for this week, the wget syntax would be

Next week, it will be:

Is there a way to get the directory to change in my cronjob based on what week it is?

For the second part...and I have no idea how to do this...the files I'll download all have the same name (file1.mp3, file2.mp3...) each week and I don't want to overwrite the old file. Right now, I'm renaming the files to file1.mp3.old and file2.mp3.old, and then downloading the new files.

Is there a way to only rename the old files if the server can connect to the remote FTP site? Right now (not very often, but occasionally) the files get renamed, but then my server can't connect to the remote FTP server, resulting in broken links until I can connect to the remote site.


Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wget on CentOS doesn't work correctly. webking HOWTO-Related Questions 0 5th December 2007 03:29
Question from a newbie: can't login on proftpd Chris_elmp Installation/Configuration 2 24th August 2007 22:36
Odd question for Falko Randy Installation/Configuration 1 16th October 2006 15:58
sendmail config question westb Server Operation 1 1st September 2006 18:00
Really Basic Question !!! brainz Installation/Configuration 7 14th March 2006 00:20

All times are GMT +2. The time now is 22:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.