How to read a file name from a specific path

Login to reply to this topic.
Mon, 2005-11-28 14:56
Joined: 2005-07-10
Forum posts: 68
Hello,

I could not manage how to get a file name from a path (c:\send\). Say I have 10 files in the location "c:\send\"  like txt1.txt, txt2.txt, etc. I can show  the list of files in a dialog and user can scroll and choose a file and select OK. When OK is pressed, I could only get the full path of that file, like c:\send\txt1.txt. I want to know how can I get the file name only instead of full path. Right now I am doing it in a complex way by parsing the path. I think there must be some easier way to get a file name from a path. Sorry for such silly question, just could not find it any where?

Mon, 2005-11-28 15:07
Joined: 2005-11-20
Forum posts: 1242
Re: How to read a file name from a specific path
Check the TParse class.

René Brunner

Mon, 2005-11-28 15:21
Joined: 2005-07-10
Forum posts: 68
Re: How to read a file name from a specific path
Thaks Buddy! Problem solved.
  • Login to reply to this topic.