*BSD News Article 67258


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!inquo!in-news.erinet.com!bug.rahul.net!rahul.net!a2i!genmagic!sgigate.sgi.com!swrinde!howland.reston.ans.net!ixnews1.ix.netcom.com!ix.netcom.com!news
From: SolutionWorks <solwork@popd.ix.netcom.com>
Newsgroups: comp.unix.misc,comp.unix.bsd.misc
Subject: Re: How to delete files within C programs
Date: 30 Apr 1996 19:19:16 GMT
Organization: Andersen Consulting
Lines: 6
Message-ID: <4m5p3k$3nq@dfw-ixnews2.ix.netcom.com>
References: <Oum-El-Kheir.Benkahla-3004961724540001@mac-ugm-3.imag.fr>
NNTP-Posting-Host: stp-fl4-06.ix.netcom.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-NETCOM-Date: Tue Apr 30  2:19:16 PM CDT 1996
X-Mailer: Mozilla 1.2 (Windows; U; 16bit)
To: Oum-El-Kheir.Benkahla@imag.fr
Xref: euryale.cc.adfa.oz.au comp.unix.misc:22282 comp.unix.bsd.misc:868

Very simple solution, use the 'unlink' system function to delete files
from C programs.  If the name of the file is variable, use 'sprintf'
to create the filename, then 'unlink' to delete it...

Rich