Help creating first Automation - find/delete/edit/love and ducks

Hi there,

I’m new to Automator and you can consider i’m a newbie in coding/scripting (last time i code something it was Actionscript Flash years ago and i just copy/paste/modify some stuffs)

Here is the structure of my folders i need to process :

  • initial folder (name can change)
    – Multiples sub folder (second level folder) (names can change)
    ---- sub folder 2 with 1 javascript file inside it (third level folder, name never change)
    ---- index.html files, images, javascript etc.

What i need to do :

  1. An invite to chose initial folder to process, lets call it “Initial Folder”
  2. move all files inside the third level folder in the second level folder (1 .js file inside, name never change)
  3. delete the empty 3rd level folder (name never changes)
  4. edit the index.html file (search/replace a string, always the same, can be “hard coded”, i don’t need to modify this each time, obviously need to replace the path to the js file :wink: )
  5. spread love with a nice “Tadam sound” (or a duck sound maybe better)

Do you think it’s possible ?
Do you have an idea (i’m stuck near the first steps for moving files, deleting empty folder, etc.)

Thank you very much for any help :slight_smile: