in reply to to get file names and timestamps from sharepoint

I have used NTLM to connect sharepoint

What is sharepoint and how did you connect? Does it support listing files?

  • Comment on Re: to get file names and timestamps from sharepoint

Replies are listed 'Best First'.
Re^2: to get file names and timestamps from sharepoint
by Sinistral (Monsignor) on Mar 21, 2010 at 14:33 UTC

    SharePoint is a Microsoft enterprise solution for providing collaborative space and document/artifact workflows. The fact that you've already connected via NTLM is a good first step. Since everything in SharePoint is a list, please see the links I posted in Access sharepoint calendar using LWP (which, despite the title, I provided links that do NOT use LWP.

      use WWW::Mechanize; use LWP::UserAgent; use LWP::Authen::Ntlm; use Storable; use DBI; use FileMoveDMS2DStage_Parm; use LWP::Debug qw(+); my $URL_Parm_DMS="https://sharepoint.com"; &Parm_file::InitEnv();#parameter file for credentials# $mech = WWW::Mechanize->new(autocheck=>1,keep_alive=>1); $mech->agent_alias( 'Windows IE 6' ); $mech->credentials("sharepoint.com:443",'',$ENV{'UserId_Parm_DMS'}, $E +NV{'Password_Parm_DMS'}); $mech->get($URL_Parm_DMS); my $html = $mech->content; @names = qw(file1); # COUNTS EACH ELEMENT OF THE ARRAY $n = 0; $mech->get($urlFile); $mech->save_content($filename);
      I have tried with this code to connect. But if i get the file name from share point my work is very easy. But some how i am not able to get idea to know the file name. I would really appreciate he you guys could help me on this.

      20100409 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

        First off, please edit your code so that the Perl code is between <code> and </code> tags.

        Then please explain what you are asking for. Your code seems to connect to SharePoint as if it were a web browser and tries to download files from a particular page. Is that correct? I'm guessing that when you use Internet Explorer and use your credentials for accessing the SharePoint site you see a paticularlist of files. What happens when you run your script? Are there any debugging messages? I also don't see the ever popular

        use strict; use warnings;

        which helps identify many problems with Perl code. Did you write this code, or simply copy it from example without understanding what it is trying to do?

        But some how i am not able to get idea to know the file name. I would really appreciate he you guys could help me on this.

        Um, read the sharepoint documentation