Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing a form from onCreate()

Status
Not open for further replies.

nicasa

Programmer
Feb 3, 2003
54
ES
Hi There,

I know that there is a method (Win32 API, I think) that can be used to check for the existence of a file or folder within a program. You simply pass the path of the file or folder as a char* to the function.

What is it called ?

regards,

Steven Matthews
 
Do you mean checking the existence of a file within the program Directory? Or do you mean checking the existence of a file, by calling a function in your program?

Either way, call "bool __fastcall FileExists(AnsiString Filename);"

That works for files.

For folders, you need to use "bool __fastcall DirectoryExists(AnsiString Directory);"

Chris

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top