How can we use the filepath,If we changed that path?

Hi @ All,

I’m using one input file in my bot,If I will change the input file path
Then the bot will get error…
My question is It has to take the file path will be there in a particular folder or we changed
What we can do?

Hi @varunk,

You mean to ask, if your file name gets change also bot should keep reading your file from a folder? No matter what file name is there.

Best regards,

May be from the beginning, we should use some external file like config file to store paths, that may change?

Hi @Avi7

Yes If I changed the input file also bot has to run
Is there any possibility to take file path automatically

you’ll have hardcode at least one file path in your workflow. which contains file path such file will be Config.txt/xml/xlsx/json.

Hi @Pankaj.Patil


Hi @varunk,

DEMO1.xaml (8.2 KB)

You have to hard code the directory or can give path of directory in Config file. This code is for “.txt” extension files. You can change according to your need by changing the extension in
assign activity “Directory.GetFiles(fileDirectory, “*.txt”)” .

Best regards,