Thread: Deleting folders with everything in the directoy

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    69

    Deleting folders with everything in the directoy

    How do i delete a folder with all its files in it and all those subdirectories and so on

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Think recursively.....
    You can use remove(const char* filename) from <cstdio> or <stdio.h>
    on windows systems you can use DeleteFile(LPCTSTR pFilename)
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error while trying to list folders
    By Hellbinder in forum Networking/Device Communication
    Replies: 5
    Last Post: 06-12-2009, 05:27 PM
  2. Deleting folders and sub folders
    By Boomba in forum C++ Programming
    Replies: 30
    Last Post: 06-11-2003, 11:58 AM
  3. Deleting Folders
    By Kyoto Oshiro in forum C++ Programming
    Replies: 5
    Last Post: 03-31-2002, 05:19 PM
  4. Deleting entire folders
    By SirDavidGuy in forum C++ Programming
    Replies: 10
    Last Post: 03-02-2002, 10:54 PM
  5. Replies: 12
    Last Post: 01-23-2002, 07:56 PM