# Is it possible to add files to a document library or modify metadata from the command prompt?

I have a number of pdf-reports that I would like to upload to a WSS 3.0 document library. The pdf-files are generated by a number of scripts that collect data and compile a report using LaTeX.

I can copy the pdf-files to the SharePoint document library by mapping the document library and using copy

net use x: \\path\to\sharepoint\document\library
copy myfile.pdf x:


where x: is a free drive letter. However, I would like to supply some additional metadata to columns in the document library directly from the script that generate the pdf-file and copies it to the SharePoint document library.

Is it possible to achieve the above using standard Windows command line tools or does a small application exist that I can put on the file server together with the report generating scripts? I don't have rights to install programs on the users PCs.

• I think my question is a dublicate of this one: <sharepoint.stackexchange.com/questions/17074/…>. Sorry. – Martin Heller Aug 1 '11 at 11:28
• Except for the metadata part. – Jesus Shelby Aug 1 '11 at 13:40
• I really need some help here I'm in the same situation but I have a document I would like to change the Modified Date on. I'm struggling to do this with Powershell can someone help we are using Windows Sharepoint Servies 3.0 [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $site = New-Object Microsoft.SharePoint.SPSite(“upnorthsharepoint/UNGIMS”)$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local $url = "upnorthsharepoint/UNGIMS"$listName = "Shared Documents" $item =$list.Items | ? {$_.Name -eq$fileName} \$fileName = "Bring Your Own Device [BYO – Carl Webber Apr 26 '18 at 15:19

MS has a few posts that might assist you.

• Thanks. The PowerShell interface appeals to me. However, I'm not sure I can use it as a normal user with WSS 3.0? I have downloaded and installed PowerShell v2.0 from support.microsoft.com/kb/968929. This site get-spscripts.com/2011/03/… indicates that I should be able to use the SharePoint cmdlets with WSS 3.0 after issuing the command [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint"). However, this does not seem to activate the SP cmdlets? – Martin Heller Aug 1 '11 at 14:03
• Thank you Bas Lijten and Jesus Shelby. It seems that what I want is not possible for non-administrative users. The users that generate the pdf-reports do not have rights to access the stsadm command or to the Microsoft.SharePoint.dll on the server. They can add/remove files from the command line by mapping the document library or add/remove files and change metadata through the Web interface. – Martin Heller Aug 1 '11 at 14:44
• Do you have a link to an example of how to do this? Googling for command line and WSS gives me lots of information about administrating a SharePoint site using command line tools. But I can't seem to find information about adding or modifying contents as a normal user. – Martin Heller Aug 1 '11 at 11:59