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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.