Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > SDL script for generating code > Keywords > %fileexists keyword (SDL script)
  
%fileexists keyword (SDL script)
This keyword tests whether the file specified by the %fileexists argument exists.
Syntax
%fileexists "<file>"
The following example sets the value of the FilePresent to true or false, depending on whether a readme.txt file exists.
%if %fileexists "C:\\MyProject\\Readme.txt" %then
%setlocalvar "FilePresent" = "true"
%else
%setlocalvar "FilePresent" = "false"
%endif