I am building a bot that must create a file folder for an individual that does not currently have a folder created. For each instance, the individual “identifier” will be a variable.
For example:
candidateName = “Smith001”
I must search through a directory to see if folder “Smith001” already exists.
Folder Path to search: C:\xxxx\xxxxxxx\xxxxxxxx\Candidate Files\N to Z\Smith001
I tried using the “Path Exists” options; however, it’s not allowing to use wildcards in the path name. I need to use the wildcards to allow for a different subfolder to be searched. (ie. A to M instead of N to Z)
I tried the following and it worked…
Folder Path to search: "C:\xxxx\xxxxxxx\xxxxxxxx\Candidate Files\N to Z"+candidateName
But in an attempt to create a wildcard for the \N to Z, I tried the following and it did not work…
Folder Path to search: “C:\xxxx\xxxxxxx\xxxxxxxx\Candidate Files\N to Z"+”*"+candidateName
How do I search for a file folder (…or a folder containing the candidateName variable) in a directory?
An incoming email contains a candidate’s name identifier along with a specific job they are applying. Every time an email comes in, we must create a folder using the candidate’s name identifier as the name of the folder. We then populate the folder with other job-related documents. If the given candidate already applied for a job in the past, they would already have a folder in the directory (named by their name identifier) and we would not need a new folder. In that case, we could store all the job-related documents in the folder already created.
So…if the current variable is the name identifier. I need to search the directory for this folder…if it exists, move to next step. If not, create this folder.