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.

6

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.

  • 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 Jun 24 '15 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 Jun 17 '16 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 Nov 28 '16 at 3:12
  • 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 Jan 17 '17 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.

  • Do you mean General/May/Sent/[%Current Item:Name%]? – Nullldata Apr 26 '19 at 10:27

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.