Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

How to upload file from Linux to Sharepoint using Perl

by grao5 (Initiate)
on Aug 14, 2013 at 23:47 UTC ( #1049490=perlquestion: print w/ replies, xml ) Need Help??
grao5 has asked for the wisdom of the Perl Monks concerning the following question:

I have a requirement to programmatically upload a flat file (xyz.txt) that gets generated everyday on a Linux server to Sharepoint.

Please advise how it can be done using Perl on Linux. I could then schedule this script to run as a job everyday at a particular time to automate this process.

Your advise would be much appreciated. Any example code extract would be even more helpful.

thanks

  • Comment on How to upload file from Linux to Sharepoint using Perl

Replies are listed 'Best First'.
Re: How to upload file from Linux to Sharepoint using Perl
by frozenwithjoy (Priest) on Aug 15, 2013 at 01:13 UTC
    Seems like it would be easier to just create a cron job to schedule a daily curl call.

    To edit your cron jobs, use: crontab -e. Adding something like the following should upload your file every morning at 5AM:

    00 5 * * * /usr/bin/curl --ntlm -u <your Active-Directory-Domain>/<you +r-domain-username> -T /path/to/xyz.txt http://sharepoint.url.com/doc/ +library/dir/
      curl --ntlm -u domain/userid:passwd -T <file> "sharepoint URL"
      simpe one curl --ntlm -u domain/userid:passwd -T <file> "sharepoint URL"
Re: How to upload file from Linux to Sharepoint using Perl (protocols)
by Anonymous Monk on Aug 15, 2013 at 01:45 UTC
Re: How to upload file from Linux to Sharepoint using Perl
by ww (Bishop) on Aug 15, 2013 at 01:26 UTC

    Seems as though the "requirement" was probably set by a teacher (and is homework) or by a boss (and is $work).

    If the former, you won't learn much if we supply the code... and, generally, our charter is to help you learn; not to be code-a-matic.

    If the latter, the boss should hire a programmer - - i.e. pay for the $work.

      Seems ...

      So ww do you know which modules can be used?

        "...you know which modules can be used?"

        WWW::Curl which sucks - IMHO. I guess therefore the many hints to call curl directly...

        Regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

        simpe one curl --ntlm -u domain/userid:passwd -T <file> "sharepoint URL"
Re: How to upload file from Linux to Sharepoint using Perl
by sundialsvc4 (Abbot) on Aug 15, 2013 at 13:02 UTC

      Holy moly, you are back. And i thought you retired!

      «The Crux of the Biscuit is the Apostrophe»

        Holy moly, you are back. And i thought you retired!

        Look at the dates , always look at the dates :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1049490]
Approved by NetWallah
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2016-06-28 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (356 votes). Check out past polls.