Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > Samples

Lost Password?

Thread Tools Display Modes
Old 12-24-2011, 02:01 PM
Rad Koder Rad Koder is offline
Junior Member
Join Date: Dec 2011
Posts: 3
Post ExtractFileNameEX - Extract File name without extension

The following function of Object Pascal (Delphi) will extract the file name without extension.

function ExtractFileNameEX(const AFileName:String): String;
   I: integer;
    I := LastDelimiter('.'+PathDelim+DriveDelim,AFileName);
        if (I=0)  or  (AFileName[I] <> '.')
                 I := MaxInt;
          Result := ExtractFileName(Copy(AFileName,1,I-1));
Feel Free to use this Function
Happy Coding
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 08:32 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.