2017-03-25 162 views

回答

2

例如,我用一個小功能在PowerShell和一個批處理文件,我可以下載這樣的一個文件:

@echo off 
Set "URL=http://www.kcc.edu/campaigns/PublishingImages/poh.jpg" 
Set "File=%USERPROFILE%\Pictures\Hello.png" 
Call :Download "%URL%" "%File%" 
Start "" "%File%" 
exit 
::********************************************************************************** 
:Download <url> <File> 
Powershell.exe -command "(New-Object System.Net.WebClient).DownloadFile('%1','%2')" 
exit /b 
::********************************************************************************** 

這裏是我用同樣的功能,以下載名爲工具的另一個例子VirusTotal Uploader from Virustotal.com上傳和檢查文件。

Scan_Registry_Virustotal.bat

1

Check this

用的bitsadmin:

bitsadmin /transfer myDownloadJob /download /priority normal http://downloadsrv/jpg.jpg "%userprofile%\pictures\jpg.jpg" 

winhttpjs.bat

call winhhtpjs.bat https://example.com/files/jpg.jpg -saveTo "%userprofile%\pictures\jpg.jpg" 

每個用戶的圖片目錄位於%userprofile%\pictures