I have bank statements saved on Sharepoint on a daily basis. These files then have to be downloaded and saved to a specific location on a network drive to be uploaded into a program.

I log onto Sharepoint via a portal in a browser (Chrome).

What I have previously done was create a mapped drive and I wrote a .bat to copy the files from the mapped drive to the network drive. This works but I struggle daily with authentication as I do not know how to pass the credentials.

The current process is manual and I would like to automate this process.

I am open for any suggestions available.

Thank you in advance for assisting.

  • Is it an on-premises SharePoint? What kind of authentication does it use? Windows autentication?
    – Evariste
    Feb 8, 2016 at 12:53

3 Answers 3


If coding is an option, you can write console application which can be run daily using Task Scheduler.

For example you can refer below link: http://www.dotnetcodesg.com/Article/UploadFile/2/173/Copy%20Files%20from%20document%20library%20to%20local%20in%20SharePoint.aspx


Not to discourage the server side code someone has suggested in the other answer, I would actually try mapping the SharePoint site as a network drive on my server and then access the files as if they were stored on a drive. That way I can use System.IO and just do a get files recursively. Try it out! Maybe its simpler than you think.


What are you using to schedule execution of the .bat file? If it is windows task scheduler, you can change the user who 'executes' the file. Create your task that runs that batch file and save it. Then open the properties of that task and change to a higher level account, choosing "run with highest privileges".

For this to work however, your access to both SharePoint and the synched network drive will need to be federated SSO (i.e. using windows authentication, no password input when you access either). Good luck!

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.