How do I determine if a directory has multiple directories?

Currently I am working on a project which requires checking within a folder if there are folders within them and proceed to do multiple steps (Either opening the folder or uploading a document to a website)

I have already gotten the project to a point where it already goes to the website and it logs in based on credentials I give the robot, clicks the upload, and gets to the windows explorer for opening and finding documents.

@Ryan_George

Try this Directory.GetDirectories(“Path you have”) which will return the array of sub folders inside the path. If the length is greater than zero, then you can proceed further :slight_smile:

This would mostly work, however, this will cause some issues as I need it to avoid folders named in a certain way, and not to take those into account as I will not need to access those directories, and this will apply if say I have multiple accounts under one vendor, or one account but have folders for each year the invoices were from.

@Ryan_George
In case of you do know the folder names to include/exclude in a second step the retrieved folder list can be filtered e.g. with a Linq statement. Maybe you can share a list of demo folder names and a list of folders you want to process for demo purpose.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.