Fliter results of gci with strings from a textfile in Powershell
问题 After having ripped all my mother's DVD library to a Drobo-FS I setup for her, she was faced with the problem that having so many choices just a mouse-click away from made it too hard to choose. My solution was a Powershell script that starts playing a random movie: $files = Get-Childitem -Recurse -Path "\\DROBO-FS\Videos\Movies" -include *.mkv,*.avi,*.mp4,*.m4v $ran = Get-Random -minimum 0 -maximum ($files.length - 1) $movie = $files[$ran] & "C:\Program Files (x86)\MPC-HC\mpc-hc.exe" $movie