dir.create ("<C:/.../folder_name>") #include full file path
#To add files to the folder
file.create ("C:/.../folder_name/new_csv_file.csv")
#To delete files
unlink ("C:/.../folder_name/new_csv_file.csv")
dir.create(file.path(mainDir, subDir), showWarnings = FALSE)