In R, Python or Stata: How to delete all files in all subfolders : <p>I have a folder with multiple subfolders (with more subfolders in those) where different specifications of datasets are saved (sometimes sliced and diced). </p>

<p>I am afraid that some legacy files in there will mess things up when I aggregate files together. So I am looking for a command to delete all files in all subfolders of a given folders (but not the subfolders them selves). Is there a simple way of doing this in <code>R</code>, <code>Python</code> or <code>Stata</code> without having to create a list of all applicable subfolders first? </p>
