Deleting folders with everything in the directoy

This is a discussion on Deleting folders with everything in the directoy within the C++ Programming forums, part of the General Programming Boards category; How do i delete a folder with all its files in it and all those subdirectories and so on...

  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, 06:27 PM
  2. Deleting folders and sub folders
    By Boomba in forum C++ Programming
    Replies: 30
    Last Post: 06-11-2003, 12:58 PM
  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21