First off, let me preface this by saying that I am not super proficient with SharePoint. I'm just starting to work with it.

So we have a SharePoint server that I need to pull data to, from a remote Linux server. On the Linux server I already have some scripts that are running to build some data, and write it into a file.

I need to figure out how to make SharePoint grab that file from the Linux server and read it into a List in SharePoint. I know I'll need to write some Visual Basic scrips to do this, but I'm honestly at a loss for where to start. I do not know how to get SharePoint to use a VB script that I will write, much less how to actually read the file into a list.

Any assistance with this would be greatly appreciated. I have not found this particular problem out there anywhere, so I'm not sure if it is just a basic SharePoint problem or not?

Thanks! --Charles


The fastest way to do this would probably be to create a PowerShell script that runs as a scheduled task and can pull the file from Linux. The script could run as a user that has permissions to a site in SharePoint and then it could either upload the file directly to a Document Library or you could get fancy and parse the file into individual list items and add them to a SharePoint list.

Beyond that, the options are limited by your skill and the frequency at which the file has to be uploaded. If it is on-demand then you will need to write some custom code, possibly an application page or a web-part.

If you really wanted to go over the top, you could configure SharePoint's Business Connectivity Services to read the data directly from the source in Linux and possibly bypass the need for the file altogether. This is probably the most complex option but it would make that data readily available in SharePoint.

  • Dave, that sounds like just what I need. Eventually, they do want to be able to have the list as an on-demand type item. But, for now just getting the data into the list is acceptable. Can you suggest any resources for how to learn about parsing the file into the list in SharePoint? I know enough about PowerShell to be able to do it, I just don't know enough about SharePoint. – w3bguy Jul 20 '12 at 16:13
  • Basically, you will need to use the SharePoint UI and create a list and then define the fields you need to make available. As for the code itself, there are examples in the SPListItem documentation for how to add items to the list ( msdn.microsoft.com/en-us/library/…) that should get you started. The last example just before "Thread Safety" is probably almost exactly what your powershell will look like (functionally, that is) – Dave Wise Jul 20 '12 at 16:20
  • Dave, that you VERY much. You are a life saver. – w3bguy Jul 20 '12 at 16:21
  • I just ran across this blog post that can probably help you with the PowerShell/SharePoint aspect: sharepointrelated.com/2012/05/03/… – Dave Wise Jul 20 '12 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.