【发布时间】:2019-10-17 01:29:55
【问题描述】:
我正在尝试将文件从网络驱动器位置复制到 R 中的共享点库。共享点库位置需要用户身份验证,我想知道如何复制这些文件并在代码中通过身份验证。一个简单的 file.copy 不起作用。我试图使用 RCurl 库中的 getURL() 函数,但这也没有用。我想知道如何完成这项任务 - 在通过身份验证时复制文件。
以下是我目前尝试过的一些代码 sn-ps:
library(RCurl)
from <- "filename"
to <- "\\\\sharepoint.company.com\\Directory" #First attempt with just sharepoint location
to <- "file://sharepoint.company.com/Directory" #Another attempt with different format
h = getCurlHandle(header = TRUE, userpwd = "username:password")
getURL(to, verbose = TRUE, curl = h)
status <- file.copy(from, to)
谢谢!
【问题讨论】:
标签: r authentication