Message-ID: <369D971A.4D751546@cadvision.com> Date: Thu, 14 Jan 1999 00:04:58 -0700 From: Tim Hoskins Organization: Anarchy Inc. X-Mailer: Mozilla 4.06 [en] (Win95; U) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Kill the path, keep the filename? Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 207.228.74.207 X-NNTP-Posting-Host: 207.228.74.207 X-Trace: 14 Jan 1999 00:05:03 -0700, 207.228.74.207 Lines: 24 X-NNTP-Posting-Host: 204.50.1.43 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Can anybody out there help me figure out how to cut the path off a filename?

IE: C:\Program Files\Netscape\Communicator\Program\Netscape.exe

I want to work with just the Netscape.exe part...

I'[m using _truename to get the LFN version of the filename, but I keep getting errors when I try to do anything with the filename.

I'm using DJGPP ( currentversion )

Code Snippet:

char *newfilename;

newfilename = _truename(ffblk.name, NULL);
^
This here gives me an error when I'm compiling the code.

Any suggestions on a <smoooth> way to truncate the path off the filename?

Thanks

Tim Hoskins
Anarchy Incorporated
<hoskinst AT cadvision DOT com>