Hi,
I suggest you use the built-in R functions for this instead, as they will adapt to the system they are operating on.
file.create(..., showWarnings = TRUE)
file.exists(...)
file.remove(...)
file.rename(from, to)
file.append(file1, file2)
file.copy(from, to, overwrite = recursive, recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE)
file.symlink(from, to)
file.link(from, to)
Sys.junction(from, to)
If you like to move a file, you can copy it using the file.copy function then remove the one on the old location by file.remove.
Hope this helps,
PJ