hello friends this code for delete a file,when i was execute it i got o/p successbut the file was not deleted from my HDD.
#include<dos.h> #include<conio.h> #include<stdio.h> main() { clrscr(); union REGS i,o; char far *fname[67]; puts("enter" ); gets("fname"); i.h.ah=0x41; i.x.ax=(int)fname; printf("%d",i.x.ax) ; intdos(&i,&o); if(o.x.cflag==0) printf("success") ; else printf("attempt failed"); getch(); };
After 8 posts, the community expects you to know how to use code tags. Click here
Perhaps you should start a new thread then
In order to delete a file you can use the function remove("filename"); instead of writing the whole program.