Upload files from a folder to Sharepoint and check then in.

hi,

I would like to have a executable program that can upload files to a sharepoint doucment library and automatically check them in.

I am thinking that a c# executeable would do the job?
DeveloperUserAsked:
Who is Participating?
 
andrewjbCommented:
That's basically it... add references to Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime, and call that method with suitable parameters...

I think you need to download and install the sharepoint client dlls from:

 http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b4579045-b183-4ed4-bf61-dc2f0deabe47

0
 
santhimurthydCommented:
You can create an C# program to copy the files, to get the target of the Sharepoint folder. Get the network path of the location by 'Exploring the sharepoint" as window explorer and get it map to you network map directory to get the network path. Then it's coping the file from one path to other netwrok path who have access to the folder can only able to copy.
0
 
DeveloperUserAuthor Commented:
Thank you.

How about the checking in process?
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
santhimurthydCommented:
I wonn't need for any check as it's getting published directly

You are not usign the Sharepoint opject, it's Network file copy so, Once you copy the file and open in share point it will come as new file.
0
 
DeveloperUserAuthor Commented:
Hi,

We currently doing a file network copy using a batch file but the default state of the files are showing as checked out.

0
 
santhimurthydCommented:
Check whether the files are in "Read Only" mode. If that's the case then it will come as Checked out. Make as Editable mode.
0
 
andrewjbCommented:
Easiest way I've added to sharepoint is using..

Microsoft.SharePoint.Client.File.SaveBinaryDirect

But it depends which client framework you want to use.
0
 
DeveloperUserAuthor Commented:
Hi Andrewjb - thanks.

Do you have any test script?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.