2

I am looking to use a workflow to move documents within a document library to a specific folder in the same document library (this to manage access rights on different documents via the libraries). Could anyone advise how I can setup a workflow to move a document to a folder? I expected this to work similar as moving documents between document libraries, but it appears to be more complex.

Appreciate your input.

2 Answers 2

5

I found the solution myself and thought I would share the solution in case someone else encounters a similar challenge.

By using the "Update Item" functionality in SPD you can assign the name of the folder to which you would like to move the document in the "Path and Name" field, simply by adding the foldername before the name of the file. (e.g. in my example the name of the folder was "General" and the value for the "Path and Name" field is General/[%Current Item:Name%] )

By using conditions files will be saved to different folders based on meta-data assigned to the documents, and access rights are determined on the different folders to which the files are routed.

4
  • This works perfectly fine but i am getting an error on the upload step saying: the file has been modified by user with date and time -0700 when manage content types is enabled. pls share the workaround if you have encountered the same.
    – kesava
    Commented Jun 24, 2015 at 3:29
  • This doesn't work for me!!! I've followed the steps exactly but the workflow history gets stuck and eventually cancels. Here are the logs: "The item is currently locked for editing. Waiting for item to be checked in or for the lock to be released." "Waiting complete." "The workflow could not update the item, possibly because one or more columns for the item require a different type of information. The workflow operation failed because the action requires the document to be checked in. "
    – jahlive
    Commented Jun 17, 2016 at 9:41
  • i am trying to follow your article, the minute I enter the forward slash, the workflow stops working. We see the error: The file or folder name contains characters that are not permitted.
    – Sam Feder
    Commented Nov 28, 2016 at 3:12
  • 1
    I don't have anything called Path and Name. I do Update item in this list, click on this list, and in the Update List Item, I don't see an option for Path and Name.
    – Christine
    Commented Jan 17, 2017 at 19:24
0

This works perfect. Just make sure you add the entire path of the folder if is not the root folder. Ex: General/May/Working and want to move General/May/Sent you need to make sure you add the entire path General/May/Sent[%Current Item:Name%]. You can take the path using Server Relative URL in Current item. use substring is you need to trim it down.

I know it is an old post but maybe it will help somebody.

1
  • Do you mean General/May/Sent/[%Current Item:Name%]?
    – user43832
    Commented Apr 26, 2019 at 10:27

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.