Last active
June 3, 2022 12:49
-
-
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
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
$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