I am using the function file.copy()
and I have some issues. The idea is to copy files based on a list of file names from one folder to another. How can i set up the code to make it work.
list.files("C:/Test/PDF", recursive = TRUE) #
t<- read.csv2(file="C://Test//tes.csv") #is the list with the file names
a <- as.character(t[1:nrow(t),])
file.copy(a, "C:/Test/PDF verschoben" )
message:
problem copying .\Eidesstattliche.pdf to C:\Test\PDF verschoben\Eidesstattliche.pdf: No such file or directoryproblem copying .\Anmeldung_Defensio.pdf to C:\Test\PDF verschoben\Anmeldung_Defensio.pdf: No such file or directory[1] TRUE FALSE TRUE TRUE FALSE`
list.files("C:/Test/PDF", recursive = TRUE)
[1] "1/2014_Bewerbung Mietwohnung_Loe.pdf" "1/Anmeldung_Defensio.pdf" "1/Eidesstattliche.pdf" "2/Anhang_unterzeichnet.pdf"
[5] "2/Formular_unterschrieben.pdf"
a
[1] "Formular_unterschrieben.pdf" "Eidesstattliche.pdf" "Anhang_unterzeichnet.pdf" "2014_Bewerbung Mietwohnung_Loe.pdf"
Any ideas?