Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C (http://www.programmingforums.org/forum60.html)
-   -   Deleting Files? [solved] (http://www.programmingforums.org/showthread.php?t=1050)

Benoit Nov 6th, 2004 2:08 PM

I've been playing around with fopen and creating files and such...Is there a way to delete files using C?

kurifu Nov 6th, 2004 2:40 PM

I believe that command you are looking for is unlink( ); IT is included in the unistd.h header file.

erebus Nov 7th, 2004 12:44 AM

Just in case you're speaking of windows:

Iirc, the unistd.h is only in the POSIX standard C lib(variants, derivations?). It would work in windows if compiled under SFU or Cygwin. Other than that, try to find unlink() in a windows lib. Their are other way, but the suggested method above should be effective.


All times are GMT -5. The time now is 8:01 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC