Solved

Removing path from filename

Posted on 1998-03-26
1
121 Views
Last Modified: 2010-04-06
Hi,
   In my app I run an external program which takes the name of the current document as a parameter. Is there an easy way to remove all the path information ie. c:\prodelph\doc.tex should be given as doc.tex?
Cheers.
0
Comment
Question by:PiersBull
1 Comment
 
LVL 2

Accepted Solution

by:
rene100 earned 10 total points
ID: 1360887
Hi PiersBull

use the ExtractFileName function (unit SysUtils), i.e.

ExtractFileName('c:\windows\myfile.ext') returns 'myfile.ext'

hope this help

rene100
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, DigitalPersona Fingerprint reader and MySQL 6 214
IExtractImage Delphi 14 198
Thread safe  opinion 7 126
Create a path if not exists 7 68
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short film showing how OnPage and Connectwise integration works.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now