Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm looking to copy a document to a network location on a scheduled basis. Anyone have a best practice on how to do that? I thought I could write a work flow, but since I want to copy to a non-SharePoint location, I didn't see any options with SharePoint Designer.

share|improve this question
add comment

1 Answer 1

I think using PowerShell script with windows sheduler is very usefull way. UPD. Question was interesting to me and i solved it.

$web = Get-SPWeb http://sharepoint
$spFile = $web.GetFile("/Documents/folder/document.docx")
$target = "\\networkshare\document.docx"
[System.IO.File]::WriteAllBytes($target,$spFile.OpenBinary())
share|improve this answer
    
That's what I was thinking, I'm curious if anyone has done something similar and might be willing to share the few lines of code –  Bryan Smith Dec 2 '11 at 20:43
    
Question was interesting to me and i solved it. –  IAfanasov Dec 3 '11 at 9:18
    
I've done it via Nintex workflow, but nothing programmatic like that. –  PirateEric Dec 3 '11 at 12:08
    
Nintex isn't free and this code doesn't need any additional tools. But it's up2u =) –  IAfanasov Dec 3 '11 at 15:51
    
my network guy thanks you! –  Bryan Smith Dec 7 '11 at 13:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.