1

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?

5
  • 1
    is it sharepoint library folder or your windows folder? Commented Apr 9, 2013 at 15:30
  • SharePoint Folder
    – Alves
    Commented Apr 10, 2013 at 6:06
  • do you have a server version or foundation? is it 2010? Commented Apr 10, 2013 at 6:43
  • i have a Server Version (Enterprise) and it's 2010
    – Alves
    Commented Apr 10, 2013 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
    Commented Jan 9, 2014 at 11:14

3 Answers 3

1

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

0

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

0

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.

1
  • 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
    Commented Apr 10, 2013 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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