Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- q@echo off
- FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B
- FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
- FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B
- FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B
- SET date=%yyyy%%mm%%dd%
- wget -v --http-user="username" --http-password=password "http://server/dira/file:format=PDF" -O "C:test%date%file.pdf"
- wget -v --http-user="username" --http-password=password "http://server/dirb/file2:format=PDF" -O "C:test%date%file.pdf"
- #Feel free to modify date format via google search
- $dateString = Get-Date -f MM-dd-yy
- $client = New-Object System.Net.Webclient
- $client.Credentials = New-Object System.Net.NetworkCredential("user","pass")
- "File1.pdf","File2.pdf","file3.zip" | % {
- $path = "http://somesite.com/files/" + $_
- $fileName = "C:downloads" + ($_).Replace(".zip",($dateString + ".zip"))
- $client.DownloadFile($path,$fileName)
- }
- start wget -v --http-user="username" --http-password=password "http://server/dira/file:format=PDF" -O "C:test%date%file.pdf
- start /B wget -v --http-user="username" --http-password=password "http://server/dira/file:format=PDF" -O "C:test%date%file.pdf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement