Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@avipars
Created December 14, 2022 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avipars/52ba8b9a94075b28cc667559808b3b05 to your computer and use it in GitHub Desktop.
Save avipars/52ba8b9a94075b28cc667559808b3b05 to your computer and use it in GitHub Desktop.
powershell script to open all files in a set folder
$path = "C:\Users\whatever\folder"
Invoke-Item $path #open that folder
Set-Location -Path $path
$count = 0
foreach($file in Get-ChildItem $path)
{
Invoke-Item -path $file
$count++
}
Write-Host "Opened $count files"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment