Skip to content

Instantly share code, notes, and snippets.

@kudorgyozo
Created January 6, 2023 23:09
Show Gist options
  • Save kudorgyozo/e0b796b5526035599663e327b78d3858 to your computer and use it in GitHub Desktop.
Save kudorgyozo/e0b796b5526035599663e327b78d3858 to your computer and use it in GitHub Desktop.
powershell loop through files
$files = Get-ChildItem -Filter *.mkv
foreach ($file in $files) {
#Write-Output "ffg $file.Name"
$b2 = "b2-windows.exe"
$args = "upload-file gyozobucket {0} movies/columbo-hu/{0}" -f $file.Name
Write-Output "$b2 $args"
Start-Process -FilePath $b2 -ArgumentList $args -Wait -NoNewWindow
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment