I have a folder with multiple subfolders (with more subfolders in those) where different specifications of datasets are saved (sometimes sliced and diced).
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 R
, Python
or Stata
without having to create a list of all applicable subfolders first?