Article View: borland.public.cppbuilder.nativeapi
Article #6447Re: deleting files in a directory
From: JoeBlack
Date: Mon, 09 May 2005 08:19
Date: Mon, 09 May 2005 08:19
27 lines
1785 bytes
1785 bytes
Remy Lebeau (TeamB) wrote: > "JoeBlack" <JoeBlack@newsgroups.nospam> wrote in message > news:427b78e2@newsgroups.borland.com... > > >>the problem is the line >> >> wsprintf(szb,"%s%c%c",DirList->Strings[HOMENETWORK],0,0); >> >>copies a directory name, say "c:\\temp1" into the pFrom string, >>when I call the SHFileOperation it deletes the "c:\\temp1" directory. >>What I would like to do is delete all its contents but leave the >>directory intact. > > > Have youtried specifying a file mask, ie: "c:\\temp\\*.*" ? Have you tried > applying the FOF_FILESONLY flag? > > > Gambit > > Remy, Many thanks, this has sorted my problem. Joe
Technical Details
Message-ID:
<427f1cfc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<427b78e2@newsgroups.borland.com> <427bad9e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ecd37b850bb40019 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 09 May 2005 09:19:06 +0100 From: JoeBlack <JoeBlack@newsgroups.nospam> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: deleting files in a directory References: <427b78e2@newsgroups.borland.com> <427bad9e$1@newsgroups.borland.com> In-Reply-To: <427bad9e$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.177.44.179 Message-ID: <427f1cfc$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1115626748 80.177.44.179 (9 May 2005 01:19:08 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail