Created
January 6, 2023 23:09
-
-
Save kudorgyozo/e0b796b5526035599663e327b78d3858 to your computer and use it in GitHub Desktop.
powershell loop through files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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