Batch Script - How do you make it upload to a 2003 sharepoint site?
Posted on 2011-04-28
Is is possible to use a batch script to upload pdf files to a sharepoint 2003 site?
I have a batch script i use already that generates some reports from an unshared network drive. But in the middle of my script i have it pause so that i can then upload a few hundred reports to a sharepoint site manually, before it deletes these reports for the next business day.
I want to make my script smarter by having it upload the reports for me to the sharepoint site without any user interaction. Can this be done?
Couple of points that need to be in place if this is possible:
1. Batch script must be able to run from any computer on the network as the reports are on a unshared network drive. Ive achieved this by using the "pushd [path]" and "popd" commands in my present script. So if a external freeware program is needed to do this, i have seen some example where you can have the script go out and run the program from an unshared network drive. Just dont know what software does this.
2. I will need some sort of % of completion for the upload of the reports, i have seen some batch scripts do this but personally dont know how to do it. Where you will see the % go from 1 to 100 on how much is completed. Need something like this so i will know if the process has stalled or failed etc.
3. As a bonus, Would be nice to know if after the script uploads the reports it displays to the screen and tells me how many reports have been uploaded to confirm the correct number of reports went up. As these reports then need to be deleted for the next business day. So my currrent script deletes them after i upload them. So as a failsafe if the script can tell me how many reports have been uploaded before i push enter to have the script delete them that would be great.
And thats about it. I do have domain admin rights to the network, so permissions should not be a problem.
I know that some vbs scripts can be used with batch scripts. But i would prefer not to go this route and make everything work in the batch script.
Appreciate the help.