2017-03-25 138 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