I wonder to know how Alteryx can extract folder names in a known path, thank you for everyone who can give me help!
The reality is that there are many folders in one path, and I need to know the names of the folders, but I think the directory tool can only extract the names of files in the path.
Solved! Go to Solution.
Hi @EG_GBM ,
The FileGetDir function can help in this case.
It takes as argument the full path to a file and returns the path to the folder.
You can then easily remove the data to extract only the name of the folder.
Find attached an example.
Thank you for your prompt reply! But in fact there may no file in the folder, because this task only needs to create folder.
In the real case, I need to create 4 levels folder, and in "Folder2" I need to return to the name of the existing folders (which may not contains any files), and then I can make judgments and do subsequent operations:
1) If the folder I need in "Folder2" has been created, I can create sub-folders inside it.
2)If the folder I want has been not created, I can create the required folder and the corresponding subfolders.
Thanks for you help in advance!
you can create Folder Path and judge if any folder exists or not by using function FileExists( )
I got the solution from the post below: