-6

I need to delete a folder, that has files inside it..

I need to permanent delete the files, so they wont come to the receycle bin...

I've looked for many ways, such as rmdir, though it didnt recognized "rmdir" even with includes (I tried to include a lot of stuff that I've found on examples)..

Thanks!

Edit:

I'm using windows 7

I've found this :

        system("rmdir D:\\temps /s /q");

which delete the folder correctly, though I want to use a variable that contains the path.. like :

path = "D:\\temps";
delete(path);

or something in this style..

Thanks!

AmitM9S6
  • 131
  • 2
  • 13
  • Traverse the directory recursively, `remove()` all files and folders. –  Mar 29 '13 at 14:03
  • Please read this - http://stackoverflow.com/questions/how-to-ask . What OS is this on? Can't you just launch a process that runs rmdir through a command-line? Please provide more concrete details if you want people to help you. – OldProgrammer Mar 29 '13 at 14:05
  • I've edit and added more info... – AmitM9S6 Mar 29 '13 at 14:08

1 Answers1

-1

I've used this :

system(path.c_str());

path is a string which holds the path...

in the path I've added rmdir to the beggining...

AmitM9S6
  • 131
  • 2
  • 13