[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
URL地址如果不能提供,是不能遍历出来的。

TOP

本帖最后由 ivor 于 2019-4-21 19:34 编辑

多个进程下载
  1. <# :
  2. @echo off
  3. rem 增强代码兼容性,代码保存为 ".bat"、".cmd"、".ps1"均可执行
  4. more +7 "%~f0" >"%~dpn0.ps1"
  5. powershell -ExecutionPolicy bypass -File "%~dpn0.ps1"
  6. del "%~dpn0.ps1" & pause & exit /b
  7. #>
  8. if((Get-Process -Name powershell -ErrorAction SilentlyContinue).Count -lt 4 ){Start-Process "powershell" -ArgumentList $MyInvocation.MyCommand.Definition}
  9. while((Get-PSDrive (Split-Path $MyInvocation.MyCommand.Definition -Qualifier).Trim(':')).Free -gt 10mb){
  10. if(-not (Resolve-Path (($i++).ToString() + ".rar") -ErrorAction SilentlyContinue)){curl https://dl.99.com/fdsfdssfdds.rar -OutFile ($i.ToString() + ".rar")}
  11. }
复制代码

TOP

返回列表