ftp.delorie.com/archives/browse.cgi | search |
Message-ID: | <369D971A.4D751546@cadvision.com> |
Date: | Thu, 14 Jan 1999 00:04:58 -0700 |
From: | Tim Hoskins <hoskinst AT cadvision DOT com> |
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? |
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 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <TT><FONT COLOR="#000000">Can anybody out there help me figure out how to cut the path off a filename?</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">IE: C:\Program Files\Netscape\Communicator\Program\Netscape.exe</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">I want to work with just the Netscape.exe part...</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">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.</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">I'm using DJGPP ( currentversion )</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">Code Snippet:</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">char *newfilename;</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">newfilename = _truename(ffblk.name, NULL);</FONT></TT> <BR><TT><FONT COLOR="#000000">^</FONT></TT> <BR><TT><FONT COLOR="#000000">This here gives me an error when I'm compiling the code.</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">Any suggestions on a <smoooth> way to truncate the path off the filename?</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">Thanks</FONT></TT><TT><FONT COLOR="#000000"></FONT></TT> <P><TT><FONT COLOR="#000000">Tim Hoskins</FONT></TT> <BR><TT><FONT COLOR="#000000">Anarchy Incorporated</FONT></TT> <BR><TT><FONT COLOR="#000000"><hoskinst AT cadvision DOT com></FONT></TT></HTML>
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |