delete all files in directory r code example Example: r delete all files in folder unlink(directory_path, recursive = TRUE)