943,719 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 847
  • C RSS
Dec 13th, 2008
0

Re: Timer Function?

Expand Post »
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.
  1. #include<dos.h>
  2. #include<conio.h>
  3. #include<stdio.h>
  4.  
  5. main()
  6. {
  7. clrscr();
  8. union REGS i,o;
  9. char far *fname[67];
  10. puts("enter" );
  11. gets("fname");
  12. i.h.ah=0x41;
  13. i.x.ax=(int)fname;
  14. printf("%d",i.x.ax) ;
  15. intdos(&i,&o);
  16. if(o.x.cflag==0)
  17. printf("success") ;
  18. else
  19. printf("attempt failed");
  20. getch();
  21. };
Last edited by Narue; Dec 13th, 2008 at 6:27 pm. Reason: added code tags
Similar Threads
Reputation Points: 8
Solved Threads: 1
Newbie Poster
Jawahar prabhu is offline Offline
21 posts
since Sep 2008
Dec 13th, 2008
1

Re: delete a file

After 8 posts, the community expects you to know how to use code tags. Click here
Reputation Points: 124
Solved Threads: 18
Junior Poster
devnar is offline Offline
148 posts
since Sep 2008
Dec 13th, 2008
0

Re: Timer Function?

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.
Perhaps you should start a new thread then
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Erikmmp is offline Offline
11 posts
since Nov 2008
Dec 24th, 2008
0

Re: Deleting a file

In order to delete a file you can use the function
Quote ...
remove("filename");
instead of writing the whole program.
Reputation Points: 6
Solved Threads: 9
Junior Poster in Training
ajay.krish123 is offline Offline
90 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: writing to a file!!
Next Thread in C Forum Timeline: Data structure programs





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC