Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
open System.IO;
let rec getAllDirectories dir =
|> Array.collect getAllDirectories
|> Array.append [|dir|]
let directoryName = System.Environment.GetCommandLineArgs().[1]
let wrongOpprtunities =
|> getAllDirectories
|> Array.filter (fun dir -> dir.EndsWith("output", System.StringComparison.InvariantCultureIgnoreCase))
|> Array.filter (fun dir ->
let final = Path.Combine(dir, "final")
not (Directory.Exists(final)) || Directory.GetFiles(final).Length = 0)
|> (fun name -> name.Substring(directoryName.Length))
File.WriteAllLines("WrongOpprtunities.txt", wrongOpprtunities);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment