Delete all files within a directory vb6
问题 I was wondering if anyone could help me with a vb6 function that would delete all files within a directory (excluding subdirectories). 回答1: One line, using the VB6 statement Kill Kill "c:\doomed_dir\*.*" The help topic says "In Microsoft Windows, Kill supports the use of multiple-character (*) and single-character (?) wildcards to specify multiple files". As an aside - I prefer to avoid the Microsoft Scripting Runtime (including FileSystemObject). In my experience it's occasionally broken on