I made a mock up workflow, the goal is to check if the cbz file contains a folder when extracting. If a folder exists then enter the folder path. How can I check if a folder exists since I don’t know the folder name?
tar -zxvf …: This is the gist of it.
.cbz files are renamed .zip files. Using tar may work in some cases if your tar system has zip support, but it is not the default or most reliable tool for .zip/.cbz files. The correct tool is unzip.
The -v (verbose) option is useful because it lists the extracted files.
In the output you are trying to get stderr (standard error output). The list of successfully extracted files usually goes to stdout (standard output).
In the Edit Fields (Set) node you try to split stderr by newline, because I think the list of files will probably be on stdout.
Hope this helps in some way
If this suggestion solved your problem, please mark my post as the solution (blue box with check mark) so that this ongoing discussion does not distract others who want to find the answer to the original question and click the heart. Thanks
There’s nothing wrong in my workflow. What I want to know is how can I check if the extracted file contains a folder. I’d assume i’ll need to use the IF node but I don’t exactly know what to use as a condition for checking if folder exists
Have you ever considered using a Function node before the IF node because that node would execute (iterate, extract, compare) and return a simple result.
Using an IF node after the Function node simply checks the boolean result returned by the Function node.
If there is any part in Portuguese, translate it into your language, because I am Brazilian and I do not speak English, so I need to translate your question, understand what you need, see if I can help in any way, then answer, translate it into your language and then post it in the community.
Open a separate workflow to test the suggestion below OK.
If this suggestion solved your problem, please mark my post as the solution (blue box with check mark) so that this ongoing discussion does not distract others who want to find out the answer to the original question and click the heart. Thank you