I would like to know how you write a program that deletes the contents of a folder ohter than the actual folder itself. I posted the same question before, but I can't find it on this board...

Here is the code that I tried (taken from an answer to one of my posts)

Code:
system("rm -rf folderName");
This, however, did not work. Has anybody got any ideas?

Thanks
-Chris