BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

delete all files

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Nir
Guest





PostPosted: Wed Feb 04, 2004 5:50 pm    Post subject: delete all files Reply with quote



Is there a function to delete all files in a folder?
what is the best way to do that?


Back to top
Markus Humm
Guest





PostPosted: Wed Feb 04, 2004 7:45 pm    Post subject: Re: delete all files Reply with quote



Nir schrieb:

Quote:
Is there a function to delete all files in a folder?
what is the best way to do that?


Isn't this the wrong Newsgroup?

But anyway: try to look for Findfirst/Findnext which would give you the
filenames (like DIR in DOS) and then look for AssignFile and erase.

This should be found in the help. The necessary loop is then easy to
construct for you I hope.

Greetings

Markus

Back to top
Bill Todd (TeamB)
Guest





PostPosted: Wed Feb 04, 2004 8:40 pm    Post subject: Re: delete all files Reply with quote



On Wed, 04 Feb 2004 20:45:30 +0100, Markus Humm
<markus.humm (AT) freenet (DOT) de> wrote:

Quote:
filenames (like DIR in DOS) and then look for AssignFile and erase.

or use the DeleteFile procedure.

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Back to top
Wayne Niddery [TeamB]
Guest





PostPosted: Thu Feb 05, 2004 5:26 am    Post subject: Re: delete all files Reply with quote

Nir wrote:
Quote:
Is there a function to delete all files in a folder?
what is the best way to do that?

Wrong group, but another way is the Windows API SHFileOperation. This is
what Windows Explorer uses and lets you delete, recycle, move, or copy files
and directories.

You can download a free component wrapping this from
http://www.logicfundamentals.com/pages/freestuff.aspx

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks.html
"It is error alone which needs the support of government. Truth can
stand by itself." - Thomas Jefferson



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.