mdsc_oligarchy Posted October 30, 2009 Share Posted October 30, 2009 I'm trying to download a complete copy of GirlGenius using wget in a batch script. I have this so far .. for /L %%y in (2003,1,2009) do for /L %%m in (01,1,12) do for /L %%d in (01,1,31) do wget "http://www.girlgeniusonline.com/ggmain/strips/ggmain%%y%%m%%d.jpg" My problem is that windows doesn't like the leading zeros I'm trying to put into the script. What am I doing wrong? Is there a better way .. other than installing Linux .. would this even work on Linux? Note: I've already spent some time on SS64, and I've already tried doing this with the Firefox extension DownThemAll, but it is transposing numbers 01 instead of 10 and vice versa 10 instead of 01 giving me dupes of some files and not downloading others. Quote Link to comment Share on other sites More sharing options...
operat0r_001 Posted November 3, 2009 Share Posted November 3, 2009 take a look at some foo here http://rmccurdy.com/scripts/quickclean.txt Quote Link to comment Share on other sites More sharing options...
Tarbizkit Posted November 5, 2009 Share Posted November 5, 2009 rewrite in vbs, or call a vbs file from your batch file. if you take the call route, the vbs file could look something like this... If Wscript.Arguments.Count = 3 Then strYear = WScript.Arguments.Item(0) strMonth = "0" & WScript.Arguments.Item(1) strDay = "0" & WScript.Arguments.Item(2) set objShell = wscript.createObject("wscript.shell") objShell.Run("wget http://www.girlgeniusonline.com/ggmain/strips/ggmain" & strYear & right(strMonth,2) & right(strDay,2) & ".jpg"), 1, TRUE Else 'fail with a msgbox if you want End If Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.