scriptkitty Posted May 28, 2004 Share Posted May 28, 2004 (edited) Function Reference FileExists If FileExists("D:\") Then MsgBox(4096, "D: exists.") Else MsgBox(4096,"", "D: does not exist.") EndIf to If FileExists("D:\") Then MsgBox(4096,"","D: exists.") Else MsgBox(4096,"", "D: does not exist.") EndIf ..edit found by bobheart or use this page; expandcollapse popup<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Function FileExists</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="../css/default.css" rel="stylesheet" type="text/css"> </head> <body> <h1>Function Reference</h1> <font size="+1">FileExists</font> <hr size="2"> <p>Checks if a file or directory exists.<br></p> <table cellSpacing="5" width="100%" bgColor="#FFFFAA"> <tr> <td height="48" class="code">FileExists ( "path" )<br></td> </tr> </table> <p> </p> <p><b>Parameters</b></p> <table border="1" width="100%" cellspacing="0" cellpadding="3" bordercolor="#C0C0C0"> <tr> <td width="15%">Path</td> <td width="85%">The directory or file to check.</td> </tr> </table> <p> </p> <p><b>Return Value</b></p> <table width="100%"> <tr> <td width="10%">Success:</td> <td width="90%">Returns 1.</td> </tr> <tr> <td>Failure:</td> <td>Returns 0 if path/file does not exist.</td> </tr> </table> <p> </p> <p><b>Remarks</b></p> FileExists returns 0 if you specify a floppy drive which does not contain a disk.<br> <br> <p> </p> <p><b>Related</b></p> <a href="FileGetAttrib.htm">FileGetAttrib</a>, <a href="DriveStatus.htm">DriveStatus</a> <p> </p> <p><b>Example</b></p> <p class="code"> If FileExists("D:\") Then<br> MsgBox(4096,"", "D: exists.")<br> Else<br> MsgBox(4096,"", "D: does not exist.")<br> EndIf<br> <p> </p> </body> </html> Edited May 28, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now