import winim/lean proc fileExists(filename: cstring): bool = result = GetFileAttributesA(filename) != INVALID_FILE_ATTRIBUTES const filename = "C:\\path\\to\\your\\file.txt" if fileExists(filename): echo "The file exists!" else: echo "The file does not exist."