Skip to content

Instantly share code, notes, and snippets.

@Rishi-Bidani
Last active June 3, 2022 12:49
Show Gist options
  • Save Rishi-Bidani/c351cac643539e739784453ce09df4ca to your computer and use it in GitHub Desktop.
Save Rishi-Bidani/c351cac643539e739784453ce09df4ca to your computer and use it in GitHub Desktop.
This script allows you to open multiple pdf files simultaneously in edge browser
$folder = Resolve-Path -Path $args[0]
$files = Get-ChildItem $folder -Filter *.pdf
Write-Host $folder
foreach ($f in $files){
$fullpath = $f.FullName
$filepath = -join("file:///", $fullpath) |
ForEach-Object { $_ -replace "/", "\" } |
ForEach-Object { $_ -replace " ", "%20"}
start msedge $filepath
#Write-Host $filepath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment