PowerShell 일괄 파일 다운로드 스크립트
라이언의 꿀팁백과
103.159.161.129 (토론)님의 2024년 1월 26일 (금) 14:28 판 (새 문서: # Define the range of ID numbers $startNumber = 1 $endNumber = 1112 # Loop through the range of ID numbers for ($id = $startNumber; $id -le $endNumber; $id++) { # Format the ID number to have leading zeros $formattedId = $id.ToString("D5") $url = "https://www.example.com?filePath=" + $formattedId $outputName = $formattedId + ".jpg_" # Execute the external command with the formatted ID as a parameter Invoke-WebRequest -Uri $url -OutFile $outputName })
103.159.161.129 (토론)님의 2024년 1월 26일 (금) 14:28 판 (새 문서: # Define the range of ID numbers $startNumber = 1 $endNumber = 1112 # Loop through the range of ID numbers for ($id = $startNumber; $id -le $endNumber; $id++) { # Format the ID number to have leading zeros $formattedId = $id.ToString("D5") $url = "https://www.example.com?filePath=" + $formattedId $outputName = $formattedId + ".jpg_" # Execute the external command with the formatted ID as a parameter Invoke-WebRequest -Uri $url -OutFile $outputName })
- Define the range of ID numbers
$startNumber = 1 $endNumber = 1112
- Loop through the range of ID numbers
for ($id = $startNumber; $id -le $endNumber; $id++) {
# Format the ID number to have leading zeros $formattedId = $id.ToString("D5") $url = "https://www.example.com?filePath=" + $formattedId $outputName = $formattedId + ".jpg_"
# Execute the external command with the formatted ID as a parameter Invoke-WebRequest -Uri $url -OutFile $outputName
}