I was looking for a way to open random video file in my folder which has about 400 videos (20 videos in 20 subfolders).
I found a powershell script and managed it to work, but every time I run it I takes about 12 seconds to open some file, could you think of some way to make it faster?
My random.ps1 script contect is following:
$formats = @("*.avi","*.mkv")
$dir = Split-Path $MyInvocation.MyCommand.Path
gci "$dir\*" -include $formats -recurse | Get-Random -Count 1 | Invoke-Item
Thank you for your help