I'm using C++ VS 2010 in Win7. I'm trying to delete a zip. and/or txt. file that is less than a minute old. However; heres the rub. I don't know the name or location of the file. Only that I want to delete it by extension and a timestamp of newer than 1 minute. I've been looking everywhere for a solution. I do have a batch file that does this but I would prefer it in C++ in Windows. Any help is appreciated. Thank You.
DSTR3
0
Newbie Poster
Recommended Answers
Jump to PostYou can get a list of all the files/folders in a folder by first calling FindFirstFile() then call FindNextFile() until it returns no more files. Both functions returns a structure that contains the timestamp that your program will need to check. The problem is that your program may not be …
Jump to PostIf you have to search the entire hard drive then the program will miss some of them because it will take a lot more than than 1 minute to do the searches.
Look up (e.g. google) low FindFirstFile() and FindNextFile() work and you will find out how you can …
All 6 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
DSTR3
0
Newbie Poster
DSTR3
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
DSTR3
0
Newbie Poster
DSTR3
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.