There is no built-in pre-defined symbol to indicate what operating system you are compiling for. When you use .NET, you generally use the same compiled assembly on all operating systems, so this is not something that you can reasonably do in a pre-processor anyway.
You can check what OS are you running on at runtime using System.Environment
:
open System
let path =
if Environment.OSVersion.Platform = PlatformID.Win32NT then @"path\to\file.txt"
else @"path/to/file.txt"
That said, if your only concern is slashes and backslashes in a path, you can just use:
let path = System.IO.Path.Combine("path", "to", "file.txt")