1

I have a R code running on our server which downloads huge set of files from S3 and stores it in local and then loads those files into a data frame and once all the processing is done as a final step it deletes all the files from the local machine . Now if a error occurs ,the execution just halts which means someone has to manually intervene ,log into the server and run rm -rf on the data folder . Is there a way where I can have a try catch or a finally block (just like how we have in Java,Python ) where even incase of failure I can assure that the data folder is deleted from the local machine .

arpit joshi
  • 1,987
  • 8
  • 36
  • 62

0 Answers0