Play a random .ogv file in a specified folder?

I'm using rpg maker vx ace and I'm having trouble doing something as simple as drafting up a script for this. I just need a script to play a random movie in a specified folder. Nothing fancy, I'm not familiar with Ruby so i figured to ask on the forums. Thanks.
To play a random file with the OGV extension in the Movies folder:
Ruby:
Graphics.play_movie(Dir['Movies/*.ogv'].sample)

Original thread: https://forums.rpgmakerweb.com/threads/play-a-random-ogv-file-in-a-specified-folder.122577/