Borland

실행 파일의 위치를 확인하는 방법

leo21c 2008. 3. 4. 14:57

1. GetCurrentDir()

Returns the name of the current directory.

Unit : SysUtils

Category : file management routines

extern PACKAGE AnsiString __fastcall GetCurrentDir();

Description

GetCurrentDir returns the fully qualified name of the current directory.

2. ExtractFilePath(Application->ExeName)

Returns the drive and directory portions of a file name.

Unit : SysUtils

Category : file name utilities

extern PACKAGE AnsiString __fastcall ExtractFilePath(const AnsiString FileName);

Description

The resulting string is the leftmost characters of FileName, up to and including the colon or backslash that separates the path information from the name and extension. The resulting string is empty if FileName contains no drive and directory parts.

Note:This function works for multi-byte character systems (MBCS).

LIST