Create alias & Move out to new folder

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Create alias & Move out to new folder Fri Feb 19, 2021 11:00 am • by jeandupuis
Hello,

I tried for many hours to implement my solution, but I have to give up and ask for help.
Here is the scenario:

I have 2 folders:

- 01.Sync
- 02.Non-sync

Regularly, I will add a folder into "01.Sync", and It will all be synced with Google Drive. However, in the new folder, I have some huge files, which I don't want to send to google.
That's why I want to:
- create an alias to this folder
-create a new folder called the same as the project folder, but inside 02.Non-sync

Step 1: I create this project A (by duplicating a template folder structure) manually
For example
- 01.Sync
-- 01. Project A
--- 01. Article
--- 02. Videos

- 02.Non-sync

Step 2: I want to create an alias pointing to 02. Videos
- 01.Sync
-- 01. Project A
--- 01. Article
--- 02. Videos
--- 02. Videos (alias)
- 02.Non-sync

Step 3: create a new folder in 02. Non-Sync, called the same as the newly created folder
- 01.Sync
-- 01. Project A
--- 01. Article
--- 02. Videos
--- 02. Videos (alias)
- 02.Non-sync
-- 01. Project A

Step 4: move the big folder into this folder
- 01.Sync
-- 01. Project A
--- 01. Article
--- 02. Videos (alias)

- 02.Non-sync
-- 01. Project A
--- 02. Videos

I tried using shell, apple script, automator, but couldn't find the right solution.

I would be super happy if someone could give me a hand.

Many thanks
jeandupuis
 
Posts: 2
Joined: Fri Feb 19, 2021 10:48 am

Re: Create alias & Move out to new folder Mon Feb 22, 2021 10:20 am • by Mr_Noodle
Is it always named "02. Videos"? If not, what is the criteria for that? Will it always be right under the project folder or can it be deeper?

There is a "Make alias" action. You can create the alias in the current folder. Since subsequent actions in the same rule operate on the alias, you can't do the move in the same rule. Instead, you can add a "Continue" to that rule, then have another rule which matches the same thing and moves it to the non-sync folder, then does a Sort into subfolder. The tricky part is to sort it into the project folder. To do that, you'll need to use a nested condition (search for it in the manual) like the following:
Code: Select all
If (all) are met
    If (all) are met for (the parent folder)
        Name matches (•parent name)

where (•parent name) is a custom text attribute with a pattern of "anything". Once you set that, up, (• parent name) will have the name of the parent folder, which you can then use in the Sort into subfolder action.

In addition to the above, you'll need a separate rule to go into subfolders. Check the manual on how to do that but it may be tricky as you may need to limit which folders it goes into as I suspect you don't want it to go into the 02. Video folder.
Mr_Noodle
Site Admin
 
Posts: 11240
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Create alias & Move out to new folder Mon Feb 22, 2021 11:44 pm • by jeandupuis
Thank you very much for your reply, I like the approach, and it showed me some new ways of thinking I didn't consider.
I will give it a try and see if maybe I can make my logic easier.
Keep it up, great product and community !
jeandupuis
 
Posts: 2
Joined: Fri Feb 19, 2021 10:48 am


Return to Support

cron