|
-
Dec 16th, 2000, 04:12 PM
#1
Thread Starter
Fanatic Member
Like,
cout<<Type in the file to delete: ";
cin>>filepath;
???
-
Dec 16th, 2000, 04:27 PM
#2
Monday Morning Lunatic
Use the remove or unlink functions.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 16th, 2000, 04:47 PM
#3
Thread Starter
Fanatic Member
Could you please type in the code for that? I can't figure it out.
-
Dec 16th, 2000, 04:50 PM
#4
Monday Morning Lunatic
Code:
#include <stdio.h>
/* ... */
remove("autoexec.bat");
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 16th, 2000, 08:50 PM
#5
Frenzied Member
Or this:
Code:
BOOL DeleteFile(
LPCTSTR lpFileName // pointer to name of file to delete
);
DeleteFile(filename);
-
Dec 17th, 2000, 05:59 AM
#6
Monday Morning Lunatic
That's Windows only
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 5th, 2001, 07:25 PM
#7
Thread Starter
Fanatic Member
Ok, thanks, I was trying to figure it out in windows but I couldn't do it. Thanks.
Alcohol & calculus don't mix.
Never drink & derive.
-
Feb 6th, 2001, 07:49 PM
#8
PowerPoster
can you delete any file with that? like even protected system files? And one more thing, if you used that, would a virus scanner pick it up?
I am not going to write a virus, just wondering how it works.
-
Feb 6th, 2001, 07:52 PM
#9
Thread Starter
Fanatic Member
Yeah, like remove(some important files), will a virus scanner find it? I was wondering, because it is so simple.
Alcohol & calculus don't mix.
Never drink & derive.
-
Feb 6th, 2001, 08:17 PM
#10
Lively Member
It might...
I don't really know how a virus scanner works, but I am guessing that it monitors only the most important system files. If it monitored every single file, then it would slow the system down considerably. It probably won't do anything if you directly edit them with a text editor or something, but it might pop up if you change them through code. You could try it yourself, but be sure to make a backup of the one you are editing!
-
Feb 6th, 2001, 08:20 PM
#11
PowerPoster
yeah, well if you just did a full system scan, would it be able to pick up anything?
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Sep 25th, 2001, 09:43 PM
#12
Member
-
Sep 25th, 2001, 09:48 PM
#13
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|