Skip to main content
deleted 24 characters in body
Source Link

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).

I also did not need to store the filename as a variable in order for me to accomplish this final workflow but spotlight can use a variable that is a string to search I found out.

Here is my final workflow. WorkFlow

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-32 (Get Folder Contents,Filter Finder Items, and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 43-54 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 65-98 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 109-1110 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).

I also did not need to store the filename as a variable in order for me to accomplish this final workflow but spotlight can use a variable that is a string to search I found out.

Here is my final workflow. WorkFlow

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-3 (Get Folder Contents,Filter Finder Items, and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 4-5 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 6-9 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 10-11 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).

I also did not need to store the filename as a variable in order for me to accomplish this final workflow but spotlight can use a variable that is a string to search I found out.

Here is my final workflow. WorkFlow

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-2 (Filter Finder Items and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 3-4 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 5-8 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 9-10 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.

fixed formatting and grammar
Source Link

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).

I also did not need to store the filename as a variable in order for me to accomplish this final workflow but spotlight can use a variable that is a string to search I found out.

Here is my final workflow. enter image description hereWorkFlow

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-3 (Get Folder Contents,Filter Finder Items, and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 4-5 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 6-9 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 10-11 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).

I also did not need to store the filename as a variable in order for me to accomplish this final workflow.

Here is my final workflow. enter image description here

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-3 (Get Folder Contents,Filter Finder Items, and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 4-5 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 6-9 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 10-11 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).

I also did not need to store the filename as a variable in order for me to accomplish this final workflow but spotlight can use a variable that is a string to search I found out.

Here is my final workflow. WorkFlow

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-3 (Get Folder Contents,Filter Finder Items, and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 4-5 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 6-9 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 10-11 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.

fixed formatting and grammar
Source Link

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).

I also did not need to store the filename as a variable in order for me to accomplish this final workflow.

Here is my final workflow. enter image description here

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-3 (Get Folder Contents,Filter Finder Items, and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 4-5 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 6-9 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 10-11 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path)

Here is my final workflow. enter image description here

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-3 (Get Folder Contents,Filter Finder Items, and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 4-5 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 6-9 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 10-11 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).

I also did not need to store the filename as a variable in order for me to accomplish this final workflow.

Here is my final workflow. enter image description here

EXPLANATION:

(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

  1. A file being added to a folder called "WCCalcs" triggers the workflow.

  2. Steps 1-3 (Get Folder Contents,Filter Finder Items, and Set Value or Variable):

    Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'. It will always look like "#####_WCCalcs_YYYY"

    • with "#####" being a 5-digit number
    • and "YYYY" being the current year
  3. Steps 4-5 (Get PDF Metadata and Run AppleScript):

    Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

  4. Steps 6-9 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):

    Uses the newly created folder name to do a spotlight search as well as filters down to a destination folder which we stored in a variable called 'Destination.

  5. Steps 10-11 (Get Value of Variable and Move Finder Items):

    Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.

fixed formatting and grammar
Source Link
Loading
added 29 characters in body
Source Link
Loading
Source Link
Loading