Get previous path and rename files


I attached a screen shot of the server folder hierarchy that we use between several people at work. I am trying to get a pdf from one folder "Working" to the "Imposed to Press" with an _words to the end.
File path started from is were I am missing something. Is there a way to get the filepath.
Example: AraxiVolume_Jobs/Jobs/156214/UserDefinedFolders/Digital/Working/156214.pdf
The above PDF would be copied with a new name 156214_Rev.pdf to the "Imposed to Press" folder inside the same job.

I have been trying to use a watched folder that would get the path and that works except I can only get it to go to a different static out folder. I need it to pick up the complete path (Of were the dropped folder came from) Except the /Working and that would be the variable and I could replace the /Working with /Imposed.

What is the best, or anyway to get the path variable with out the current folder.

Final Outcome would be 156214_Rev.pdf inside the "Imposed to Press" folder
Any help would be greatly appreciated.

Here's an example macro to get you started.
You will need to modify to meet your specific needs.
Please let us know if this works for you, or if you have further questions or issues about this topic.

Macro Demo


MACRO:   Move Files Selected in Finder to Specified Folder [Example]

~~~ VER: 1.0    2019-03-20 ~~~


Move Files Selected in Finder to Specified Folder [Example].kmmacros (9.4 KB)
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.




  • Move & Rename Finder Selection to Destination Folder


  1. KM 8.0.2+
  2. macOS 10.11.6 (El Capitan)

NOTICE: This macro/script is just an Example

  • It has had very limited testing.
  • You need to test further before using in a production environment.
  • It does not have extensive error checking/handling.
  • It may not be complete. It is provided as an example to show you one approach to solving a problem.

How To Use

  1. First, follow instructions in Macro Setup section below.
  2. Select one or more files in Finder to be moved.
  3. Trigger this macro.


  • Carefully review the Release Notes and the Macro Actions
    • Make sure you understand what the Macro will do.
    • You are responsible for running the Macro, not me. ??
  1. Assign a Trigger to this maro..
  2. Move this macro to a Macro Group that is only Active when you need this Macro. This is probably the Finder Group
  3. ENABLE this Macro.
    (all shown in the magenta color)
    • SET to Fulll Path of Destination Folder

TAGS: @Finder @Move @Files


  • Any Action in magenta color is designed to be changed by end-user


  • To facilitate the reading, customizing, and maintenance of this macro,
    key Actions are colored as follows:
  • GREEN -- Key Comments designed to highlight main sections of macro
  • MAGENTA -- Actions designed to be customized by user
  • YELLOW -- Primary Actions (usually the main purpose of the macro)
  • ORANGE -- Actions that permanently destroy Variables or Clipboards,
    OR IF/THEN and PAUSE Actions


  • While I have given this limited testing, and to the best of my knowledge will do no harm, I cannot guarantee it.
  • If you have any doubts or questions:
    • Ask first
    • Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.


I think I was missing how to split the path and didn't even know how to word that to even start the search. I will definitely give this a try as soon as I can get back to and let you know either way. Thanks for the quick reply.