Hi All,
It's kind of complicated. My purpose is to create 'ddmmyyyy' folder under 'yyyy' folder. I've got two conditions here:
1 to see if there is 'yyyy' folder, if not, create one.
2 to see if there is 'ddmmyyyy' folder under 'yyyy', if not, create one.
The flow goes well till the end and shows 'Your flow ran successfully.' somehow the step create folder doesn't have any result in the flow, neither there is new folder in the target 'yyyy' folder.
It confuses me for days since the problem never happens IF there is any file or folder in 'yyyy' folder.
I've searched many topics but no related problem like this one.
Please let me know if further info is needed. Thanks for help!
Solved! Go to Solution.
Hello @POMPAC ,
you can just add the new folder in the path to the new folder.
Hello @POMPAC ,
from the flow run history it seems the whole 'Condition' part of the flow is skipped because the input of the 'Apply to each' action doesn't contain any item.
Check if the 'body' input contains any items by adding it into 'Compose' action right before the 'Condition'.
Thanks for your reply @tom_riha . It is the thing that the body contains nothing and returns an empty array in "List folder" step as below.
once there is any file or folder like I manually create 1 dummy file, the body will not be empty and the "Create Folder" runs perfectly. But it is the reality that on 2022 Jan 1st 0:00:00, there will be folder "2022" created first then folder "Jan 1st" created inside "2022", It seems not so "automated" if I need to create something in the "2022" to let the rest flows run...
I was first trying to use "length(body) = 0" to create new folder but it fails, I also tried creating new empty array and compares with body also fails.
Or is there any option to automatically create one file or folder right after the folder "yyyy" is created? I just want to solve the problem. Thanks again.
Hello @POMPAC ,
you can just add the new folder in the path to the new folder.
YES YOU ARE RIGHT!
Why not create the folder directly?
So I change the flow as below to create month folder following the year folder without list folder, so no "empty" body check and judge, no problem.
And the folder will not be replace if the flow runs again in next circle, what an amazing logic!
Thanks so much for your help @tom_riha . Have a great day ~
User | Count |
---|---|
102 | |
40 | |
29 | |
23 | |
16 |
User | Count |
---|---|
132 | |
52 | |
50 | |
36 | |
24 |