I've written a PowerShell example that uses DotNetWikiBot.dll.
$LocalFolderToSaveTo = "C:\DownloadLocation"
$EnWiki = new-object DotNetWikiBot.Site("http://en.wikipedia.org", "WikipediaUserName", "WikipediaPassword");
$PageList = new-object DotNetWikiBot.PageList($enWiki);
$ImageExts = ".jpg", ".png", ".jpeg"
Foreach($Page in $PageList.pages)
if(($ImageExts -eq $Page.Title.substring($Page.Title.length - 4, 4)) -and (!($Page.Title.startswith("File talk"))) )
$DownloadTo = $Null
$RenamedPage = $Page.Title.replace("File:", "")
$RenamedPage = $RenamedPage.replace("`"", "") # "
$RenamedPage = $RenamedPage.replace("`'", "")
$DownloadTo = join-path $LocalFolderToSaveTo ($RenamedPage)
( Article on my site )
That's cool. If someone asks me about PowerShell, I'll refer them right to your article.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.