1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
open System;;
open System.IO;;
open Array;;
open Printf;;

let del path =
    let dirFiles = Directory.GetFiles(path, "*~", SearchOption.AllDirectories) in
    iter File.Delete dirFiles;;

if length Sys.argv = 2
then
    del Sys.argv.(1)
else
    ();;