I have a batch script that is used to collect some data and upload that on other servers, using xcopy in a windows 7 command line. I want that script to collect some files that are on share point, so I need to get them using an URL and I n开发者_运维百科eed to login.
xcopy can't do the job, but are there other programs that can do it?
Theoretically, you can bend cURL to download a file from a SharePoint site. If site is publicly available, it's all very simple. If not, you'll have to authenticate first, and this might be a problem.
wget for windows maybe? http://gnuwin32.sourceforge.net/packages/wget.htm
The login part can be done using CURL
, supplying the user name and password as post
arguments. You can supply post args using -d or --data
flag. Once you are logged in (and have required permission), you can fetch the required file and then simply transfer it using xcopy
as you are already doing for the local files.
精彩评论