Check that file exists: Difference between revisions

Line 143:
 
Getline method. Also works in a Windows environment.
<lang AWK>BEGIN {
# syntax: GAWK -f CHECK_THAT_FILE_EXISTS.AWK
BEGIN {
exists("input.txt")
exists("\\input.txt")
Line 170 ⟶ 168:
return 1
}
}</lang>
}
</lang>
 
{{works with|gawk}}
CheckingCheck file only (no directories)
<lang>gawk 'BEGINFILE{if (ERRNO) {print "Not exist."; exit} } {print "Exist."; exit}' input.txt</lang>
</lang>
 
=={{header|BASIC}}==