The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Magnum on April 11, 2010, 12:36:22 AM

Title: Delete all files API ?
Post by: Magnum on April 11, 2010, 12:36:22 AM
Is there an API that can use wildcards to delete all files in a directory?

Thanks.
Title: Re: Delete all files API ?
Post by: hutch-- on April 11, 2010, 12:44:39 AM
Vaguely I remember there is a "Shell" function that will delete a tree but exercise great care, they can take out more than you want. You can also roll your own using a recursive delete algorithm. When I developed one some years ago i tested it on a bare partition as one mistake in development and you can take out the contents of a whole drive with it.
Title: Re: Delete all files API ?
Post by: sinsi on April 11, 2010, 02:54:31 AM
SHFileOperation can delete more than one file at a time using wildcards.