Thread: file delete

  1. #1
    Unregistered
    Guest

    Question file delete

    Hello.
    I am new to all this...I know how to open/read/write/close files but I can't seem to find a way to delete and files once they are made. Please help!

  2. #2
    Registered User fletch's Avatar
    Join Date
    Jul 2002
    Posts
    176
    click me!

    Go to 'some useful functions.
    "Logic is the art of going wrong with confidence."
    Morris Kline

  3. #3
    Unregistered
    Guest

    Talking

    Thanx!

  4. #4
    Unregistered
    Guest

    Red face Forgot

    Sorry...I forgot to ask...how do you recursively delete a folder that has files and folders in it?
    Sorry again!

  5. #5
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    You could use the system command and the appropriate OS commands, I think its deltree on Windows

    system( "deltree c:\\My Docs" );

    or something similar at least

  6. #6
    Unregistered
    Guest
    I have windows 98...my compiler is one of the two...Dev-C++ or Turbo C++ 3. I need a way that would delete the folder, all the folders in it, and all the files in it. Because sometimes the Operating System's delete function doesn't work....I have to restart in MS-DOS mode to delete one file...so I thought I should make a program that does that so I don't have to restart every time...
    Thanks!

  7. #7
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    You should be careful, sometimes the OS lets you think you've deleted files when you really shouldn't be deleting them. Just a cautionary word....

  8. #8
    Registered User /\/\ E /\/ @'s Avatar
    Join Date
    Jul 2002
    Posts
    10
    well...?
    anybody have an aswer at all? Please I need help too!
    Last edited by /\/\ E /\/ @; 07-25-2002 at 08:22 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  3. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM