Hi,
How can I pull folder names from a directory? I do not want the subfolders or files names
I also want the folder names even if they do not contain a file.
Thanks.
@FinnCharlton I was thinking along these lines. However, if you have a folder in your directory which doesn't contain files, the directory tool will not output this particular folder as a result (using this workflow approach). Thus, this won't display all folders as requested.
It would be nice to see something where it display the folders and if there isn't any files, it displays Null under 'FileName'.
thanks it works.. would there be any scenario where this wouldnt get all folder names? It seems like I am not getting all of them. Only 50/200 are being returned..
@wonka1234 Do the folders, that are not being returned, contain files?
@BS_THE_ANALYST Correct! I do want the folder names even if there are no files contained in a subfolder.
If you need folders without files then I don't think the directory tool can help you. In this case you'll need to use the "Run Command" tool to display all the folders in a directory. Using the dir command along with the d attribute will just show you folders without files or subfolders. There is plenty of online material around this - here is a decent intro to the Run Command tool:
And here is the documentation for the dir commnad:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/dir
Hi @wonka1234
See attached. Failing this, you can use the Run tool and config to use a .bat to list folders