Path Exists always set to False even if file exists

Hi, guys

I’m facing a really weird issue. My process was working flawless but suddenly I had a problem with Path Exist Activity. Just a brief of my process:

1- It runs in a folder
2- Applies a serie of regex to get datas from those files
3- Insert them on a csv file

But even if my file exists, the boolean variable of Path Exists Activity comes with the False value.

Screenshot_18

What’s happening here? My code was working perfectly but suddenly, this error came up. So my workflow always finishes… but it shouldn’t. What is probably happening?

Thanks in advance

I don’t know for the issue but you might:

  • Get rid of the PathExists activity
  • Check for File.Exists(csvPath) directly with csvPath as your file’s path.

Another point, when checking for True/False on a boolean, don’t check var = True or var = False but respectively check for var or Not var

1 Like

Hi, I came across the same issue.
Hope my solution could help you.

  1. The file name should end with the type of the file, like “xlsx”
  2. If condition: just keep the variable, delete =False/True
1 Like