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?

  • 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 '14 at 11:14

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.


| improve this answer | |

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,


| improve this answer | |

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.

| 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

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.