We can delete the file using remove method.
#include<stdio.h>
void main()
{
int ret;
//
remove method accepts the name of file to be deleted as a parameter
ret=remove("c:\\abc.txt");
if(ret==0)
{
printf("File is deleted
\n");
}
else
{
printf("File not
deleted \n");
}
getchar();
}
No comments:
Post a Comment
Leave your valuable feedback. Your thoughts do matter to us.