18 lines
584 B
PowerShell
18 lines
584 B
PowerShell
# 指定文件路径
|
|
$filePath = "D:\CmiiDeployOffline\ZheJiangErJiPingTai\all-gzip-image-list.txt"
|
|
# 指定下载的目标目录
|
|
$destinationFolder = "D:\CmiiDeployOffline\ZheJiangErJiPingTai"
|
|
|
|
# 创建目标目录(如果不存在)
|
|
if (-not (Test-Path $destinationFolder)) {
|
|
New-Item -ItemType Directory -Path $destinationFolder
|
|
}
|
|
|
|
# 读取文件并下载每一行的 URL
|
|
Get-Content $filePath | ForEach-Object {
|
|
$url = $_
|
|
Write-Output $url
|
|
# $fileName = Join-Path $destinationFolder (Split-Path $url -Leaf)
|
|
# Invoke-WebRequest -Uri $url -OutFile $fileName
|
|
}
|