Files
phorcy-stealer/elinethingz/utils/checkfile.nim

13 lines
311 B
Nim

import winim/lean
proc fileExists(filename: cstring): bool =
result = GetFileAttributesA(filename) != INVALID_FILE_ATTRIBUTES
const
filename = "C:\\path\\to\\your\\file.txt" # double-\ because it's an escape character.
if fileExists(filename):
echo "File exists."
else:
echo "File does not exist."