Illegal characters error

Hi
please give me suggestion when i am extracting value from web application and creating folder on that extract value name i am getting error like this
"E:\Drive" + Candidate_Id
image

Welcome to the forum community :slight_smile:

try this “E:\Drive\” + Candidate_Id.ToString

@2coms

i tried but this is not working

Hi @2coms

Is Drive a Folder?

Thanks
Ashwin S

drive is also a folder in drive i want create new folder folder name is candidate_Id
candidate_Id is extract value

Hi @2coms

Can you share the screenshot of E:\Drive

Thanks
Ashwin S

Hi @2coms,

Welocme to the Community !

Inside the Create Folder Activity - Please try Below.

image

Where
str_FolderPath = E:\Drive
str_FolderName= Candidate_Id.ToString


Mukesh

when i am passing input value error is not coming but when am passing extract error is coming

Hi @2coms

Try Path exists and say "E:\Drive"+Candidate_id.ToString

and then create the folder by using create folder activity

Thanks
Ashwin S

Hi,

There might be the following character or linebreak in your string.
\/:*?"<>|

You can check it at local panel in debug mode. Please set break point at this activity, and run debug.
If there is above special character or linebreak, you can use the following expression for remove them and concatenate path string.

System.IO.Path.Combine("E:\Drive", System.Text.RegularExpressions.Regex.Replace(Candidate_id.toString,"[\\/:*?""<>|`]|\r|\n",""))

Regards,

2 Likes

Thanks its working fine

2 Likes