How do you delete mutipule files in a windows program?
Printable View
How do you delete mutipule files in a windows program?
Anybody???
system ("del *.*");
Since it's windows specific, you're only options are to either use system(); and build the string as needed, or find an API call that would suit your needs (I've never looked into this one, but I"m sure there's something out there for you).
Yuck and yuck.
What's the purpose of this program first off?
To delete multiple files in a program? o_0
I don't think it goes any more complex than that.
No. The purpose. As in, what could you need to do this for?
Also, do not use system calls, very bad idea. Don't bother asking me why, just do a board search.
SHFileOperation
or
deletefile
What is this program for?
Cleanup, it's purpose is to delete Temps and Internet-Temp files.
And yes, I want to avoid using SYSTEM(); altogether.
lol. it's amazing how many functions u want are C-based. anyways, i've researched enough (and used for cleaning up, u nosy little paranoids) to know that it's really, REALLY simple, so listen up:
there's my simple ass way of doing it. as for multiple files, i'd reccomend storing the proper file data in an array, acees it through a for loop, and you should be just fine. i think i might have an idea to program it, but it's your problem and not mine :)Code:#include <stdio.h>
int main ()
{
if( remove( file ) == -1 ) {
perror( "didn't work. gee. don't u feel annoyed....no really. u should see the look an your face..." );
else
puts( "all gone FOREVER!!!! BWAHAHAHAHAHA!!!!!!!" );
return 0;
}
}
have fun with it. it's amazing powers can scare u to death though, so be careful.
and also, windows has it's own clean up thing in the control panel. just make sure u don't want to lose the games like solitaire, minesweeper, etc.
Thats DOS, not windows.
It's standard is what it is. May console forever live!
Yes, something tells me it will. I like DOS programs better myself, but the average XP user hardly knows how to run DOS! And this program happens to be for a relative, and this relative happens to be the average XP user!
lolQuote:
Originally Posted by CodeMonkey
Cool-August, have you tried the DOS-type C program to see if it would work?
How about this: Open IE. Click Tools->Internet Options->Delete Files