繁体   English   中英

从批处理文件下载文件

[英]Download a file from a batch file

如何使用批处理文件将图片自动下载到PC的图片部分?

我已经尝试过在Google上查找内容,却一无所获!

例如,我在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.com下载名为VirusTotal Uploader的工具以上传和检查文件。

Scan_Registry_Virustotal.bat

检查一下

用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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM