Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

to get file names and timestamps from sharepoint

by vbagavan (Initiate)
on Mar 21, 2010 at 10:35 UTC ( [id://829921]=perlquestion: print w/replies, xml ) Need Help??

vbagavan has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am new to perl, I have a requirement to move the files from share point to local drive using perl. The file names will change daily with the extension of current date. Example: Title modified ABC_031910.xls 03/17/10 ABC_032010.xls 03/18/10 Could you please help me any one how to get file names and timestamps. I have used NTLM to connect sharepoint. Thanks
  • Comment on to get file names and timestamps from sharepoint

Replies are listed 'Best First'.
Re: to get file names and timestamps from sharepoint
by Anonymous Monk on Mar 21, 2010 at 10:46 UTC
    I have used NTLM to connect sharepoint

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

      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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-24 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found