Files
phorcy-stealer/elinethingz/utils/stealfile.nim
2023-11-29 00:22:39 +01:00

12 lines
273 B
Nim

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."