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 have a problem. I want to move files from a SharePoint library into a folder using PowerShell. To be more specific I need to move all the files in the library for whose a SharePoint field value equals a set value (Field "Vertrauensstufe"=="vertraulich") to a folder called "geheim".

How can I do that?

share|improve this question
1  
is it sharepoint library folder or your windows folder? –  Yuri Leontyev Apr 9 '13 at 15:30
    
SharePoint Folder –  Alves Apr 10 '13 at 6:06
    
do you have a server version or foundation? is it 2010? –  Yuri Leontyev Apr 10 '13 at 6:43
    
i have a Server Version (Enterprise) and it's 2010 –  Alves Apr 10 '13 at 9:07
    
If one of the answers solved the problem statet in your question, you should mark this answer as accepted answer to help future visitors. –  Benny Skogberg Jan 9 at 11:14
add comment

3 Answers

I found these script, but it don't need the folder query... but there are some things in (e.g. the Caml-Query and the move function) that i need, but i dont know how i can customize These script for my idea.

Donwloadlink

share|improve this answer
add comment

it is not required to programm this script in PowerShell you can easily do this in C# and only load DLL into SharePoint: see it here.

If you are realy required to do this in PowerShell you can always load DLL of FrameWork into your powerShell consol and do API calls to do what you need.

Here is the answer I left for similar question. And another one: Using PowerShell how do I change the column ordering for a SharePoint List

Hope it helps,

Andrew

share|improve this answer
add comment

You can use Content and Structure to move files to a different place within a site collection. Please see a video of usage. But SharePoint Server Publishing Infrastructure site collection feature should be activated. You will need to select files manually and apply move action.

share|improve this answer
    
An document with the library field value "geheim" in field "Vertrauensstufe" should be automatically move in the folder "vertraulich" in the same library. An command in sharePoint should run the powershell move Skript. I need realy an powershell script for that Action, but i'm absolutly an beginner in Powershell Scripting. Can someone help me with what? –  Alves Apr 10 '13 at 11:56
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.