Refer to a file name

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

Moderator: Mr_Noodle

Refer to a file name Tue Dec 13, 2022 9:12 pm • by huangdi1978
Hello everybody,

I want to create a rule for my download folder:

1) File with a certain extension
2) Check if there is a folder with the same name as the file in (1).
3) If no, move file in (1) to a certain folder.

(1) and (3) is no problem. For (2) I have no solution yet. I try to use "Match Patterns in Conditions", but I couldn't figure out how to refer to the name of the file in (1). Is there a way and if yes, can you please show me the way to do it?

Thank you for your support!
huangdi1978
 
Posts: 2
Joined: Tue Dec 13, 2022 9:00 pm

Re: Refer to a file name Wed Dec 14, 2022 10:41 am • by Mr_Noodle
Look up nested conditions. You can set up a condition to target another file in the same folder.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Refer to a file name Wed Dec 14, 2022 12:34 pm • by huangdi1978
I already tried to use nested conditions. I can check if there is a folder, but I don't know how to check if there is a folder with the same name as the file.

Here my example:

https://imgur.com/a/5quk4ji

Thank you for your support!
huangdi1978
 
Posts: 2
Joined: Tue Dec 13, 2022 9:00 pm

Re: Refer to a file name Thu Dec 15, 2022 10:44 am • by Mr_Noodle
Use a match pattern with a custom attribute to match the name of the file. You can then re-use that custom attribute in the nested condition to match there.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support