Automatically Delete Files/Folders
For all files in a known path you can:
unlink("path/*")
Maybe you're just looking for a combination of file.remove
and list.files
? Maybe something like:
do.call(file.remove, list(list.files("C:/Temp", full.names = TRUE)))
And I guess you can filter the list of files down to those whose names match a certain pattern using grep
or grepl
, no?