let PATH = @"/var/data/"
let RESULT_PATH = @"/var/result/data.txt"

let getFiles(path: string): seq<string> = 
    System.IO.Directory.EnumerateFiles(path)

let getRandFile(files: seq<string>) = 
    let rand = System.Random()
    let index = rand.Next(Seq.length files)
    Seq.item index files

let files = getFiles(PATH)
let randFile = getRandFile(files)
System.IO.File.Copy(randFile, RESULT_PATH)
