Link to home
Start Free TrialLog in
Avatar of DeveloperUser
DeveloperUserFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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?
Avatar of santhimurthyd
santhimurthyd
Flag of United States of America image

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.
Avatar of DeveloperUser

ASKER

Thank you.

How about the checking in process?
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.
Hi,

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

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.
Easiest way I've added to sharepoint is using..

Microsoft.SharePoint.Client.File.SaveBinaryDirect

But it depends which client framework you want to use.
Hi Andrewjb - thanks.

Do you have any test script?
ASKER CERTIFIED SOLUTION
Avatar of andrewjb
andrewjb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial