Deleting all the files in a folder

Started by
3 comments, last by XDarkScar 20 years, 5 months ago
How would you do that. I want to delete all the files in a folder yet leave the folder still there. VC++, Windows.
Easy way of programming: Coding, Debugging, Swearing.
Google / Game Tutorials / GameDev.Net / My Project server. Check it out.
Project: N/A / Percent Complete: 0% / Due Date: N/A
Advertisement
FindFirstFile(), FindNextFile(), DeleteFile() and RemoveDirectory(). Just debug it first
system("echo y | del mydir\*.*");
Hmm..i think the best way to do that is to delete the folder and then recreate it.. much simpler.
It''s so much easier to use boost (boost.org for more info).

This topic is closed to new replies.

Advertisement