renaming a 7zip extracted folder error Access i denied R
I extracted a TxtinOut named folder using the following cmd in R
shell('7z x D:/Region02/test.7z -oD:/Region02 -r -y')
I want to rename this folder TxtinOut to New_Name. I tried file.rename() but faced an ERROR: reason 'Access is denied'
Can anyone suggest how I can proceed?
Make sure you are in the right directory
setwd("right directory")and that the files exist which you can check by using
file.exists. You can use this code to rename your file:
from <- c("TxtinOut") to <- c("New_Name") file.rename(from, to)