I wish to copy an xlsx file from a really really slow network drive to my RStudio project directory.
Although my file name in my specified file directory is unique, when I run list.files()
in that directory I get two versions of the same file. I am assuming the second is a hidden version of the file.
current_folder <- "//server/address1/address2/address3/Info/more/and more/and more again/R Code"
new_folder <- getwd()
list_of_files <- list.files(path = current_folder,
pattern = "class_xwalk_new.xlsx",
all.files = FALSE,
recursive = FALSE,
full.names = TRUE)
> list_of_files
[1] "//server/address1/address2/address3/Info/more/and more/and more again/R Code/~$class_xwalk_new.xlsx"
[2] "//server/address1/address2/address3/Info/more/and more/and more again/R Code/class_xwalk_new.xlsx"
Can anyone suggest a way I can just pick up the second file i.e. the one without ~$