FILE EXISTS: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
No edit summary
MikeO (talk | contribs)
No edit summary
Line 2: Line 2:


{{Command|syntax=FILE_EXISTS <filename>, <status>
{{Command|syntax=FILE_EXISTS <filename>, <status>
|description=*DESCRPTION*
|description=check to see if a file exists.


|param1=<filename>|param1_desc={{filename}}
|param1=<filename>|param1_desc={{filename}}
|param2=<status>|param2_desc={{status}}
|param2=<status>|param2_desc=Variable to set to the file status. 1 if the file exists, 0 if it does not.
}}
}}


===Example===
===Example===
:- FILE_EXISTS
:FILE_EXISTS "MyFile.txt", MyVar


[[Category:External_File_Handling]]
[[Category:External_File_Handling]]

Revision as of 23:45, 18 August 2010

Up

Command

FILE_EXISTS <filename>, <status>


check to see if a file exists.

Parameters

<filename>
Filename as either text in double quotes, or a text variable.
If the filename does not contain full path information, then the file will be opened in the same folder as the macro.
<status>
Variable to set to the file status. 1 if the file exists, 0 if it does not.

Example

FILE_EXISTS "MyFile.txt", MyVar