Read text file activity not working in RPA

Hi All,

I am reading a text file “Successful Email Text” using Read Text File Activity. It is working fine when running through Studio but when i publish automation to orchestrator then it encode file name like this “Successful%20Email%20Text” and because of this automation is not able to read text file. So can anyone please let me know how to fix this issue?

Hi,

Can you try UrlDecode method as the following?

System.Net.WebUtility.UrlDecode("Successful%20Email%20Text")

Regards,

1 Like

It is not working :frowning:

In my environment, System.Net.WebUtility.UrlDecode("Successful%20Email%20Text") returns Successful Email Text. Can you check whether it decodes proper in your environment?
if it decodes proper, there might be another cause such as relative path etc.

Regards,

In Exception dialogue box it is showing correct Absolute path. While in Read Text Activity I have provided path like this “Data”+System.Net.WebUtility.UrlDecode(“Successful Email Text.txt”) and In real location file name is like this “Successful%20Email%20Text.txt” and some time it becomes like this “Successful%2520Email%2520Text.txt”

Hi,

Sorry, probably I had misunderstanding. Can you try System.Uri.EscapeUriString("Successful Email Text.txt"), then use read text activity?

“Successful%2520Email%2520Text.txt”

It seems double url encoded. Did you pack the file twice? (%25 is url encoded % )

Regards,

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