Deleting subfolders and such...

This is a discussion on Deleting subfolders and such... within the C++ Programming forums, part of the General Programming Boards category; Can anyone help me in deleting subfolders, and possibly subfolders in subfolders... What I mean, is if I was to ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Deleting subfolders and such...

    Can anyone help me in deleting subfolders, and possibly subfolders in subfolders... What I mean, is if I was to write:
    Code:
    system("del C:\\Users\Default\\Incomplete /q /f");
    How would I make it delete subfolders in "Incomplete" too?
    If anyone can help, thanks.
    Anybody?
    Last edited by HelpLol; 02-10-2008 at 11:57 PM.

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    With Win32 API, use SHFileOperation.
    With the command del, use the /S switch.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    12
    Quote Originally Posted by Elysia View Post
    With Win32 API, use SHFileOperation.
    With the command del, use the /S switch.
    Thanks Elysia.. You are unto programming god.

Popular pages Recent additions subscribe to a feed

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