簡體   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