Download Backup/Utils/zipdl.ps1 from oDotOLabs/AutoO_release: direct link, hf CLI and curl.
- Browser
- Download file 626 Bytes
-
https://huggingface.co/datasets/oDotOLabs/AutoO_release/resolve/main/Backup/Utils/zipdl.ps1
- Command line
-
hf download hf://datasets/oDotOLabs/AutoO_release/Backup/Utils/zipdl.ps1
-
curl -L -o zipdl.ps1 https://huggingface.co/datasets/oDotOLabs/AutoO_release/resolve/main/Backup/Utils/zipdl.ps1
626 Bytes
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [string]$Url | |
| ) | |
| $ProgressPreference = 'SilentlyContinue' | |
| $FileName = Split-Path $Url -Leaf | |
| $DestDir = $FileName -replace '\.zip$', '' | |
| if (Test-Path $DestDir) { | |
| try { | |
| Remove-Item -Path $DestDir -Recurse -Force -ErrorAction Stop | |
| } catch { | |
| Write-Output "Deletion failed" | |
| exit | |
| } | |
| } | |
| try { | |
| Invoke-WebRequest -Uri $Url -OutFile $FileName -ErrorAction Stop | |
| Expand-Archive -Path $FileName -DestinationPath $DestDir -Force -ErrorAction Stop | |
| Remove-Item $FileName -ErrorAction Stop | |
| $true | |
| } catch { | |
| $false | |
| } | |