| View previous topic :: View next topic |
| Author |
Message |
Nir Guest
|
Posted: Wed Feb 04, 2004 5:50 pm Post subject: delete all files |
|
|
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
|
Posted: Wed Feb 04, 2004 7:45 pm Post subject: Re: delete all files |
|
|
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
|
Posted: Wed Feb 04, 2004 8:40 pm Post subject: Re: delete all files |
|
|
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
|
Posted: Thu Feb 05, 2004 5:26 am Post subject: Re: delete all files |
|
|
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 |
|
 |
|