Good night people!
I’m having a problem with if inside for Aech, regardless of Boolean, it always returns the true value.
I’m using path to for aech Directory.GetFiles(“C:\Users\luan.oak\OneDrive - Solistica\Office\SIGMA CUT\BASE XML”, "" + Row.Item(“DANFE”). ToString + ".xml ")
Can you place a log message before Path Exists and check the value you are getting
Hope this may help you
It will return true always.it is coming into the loop because it matches the files with the condition you give in directory.getfiles
Obviously it will give TRUE
The reason is
First you got the file paths of all files from a directory
Which will give some number of filepaths
Then we have passed the same to FOR EACH activity
Inside that FOR EACH activity we are checking again whether the file path exists
And it will exists as we are getting only the existing file and it’s filepath with Directory method
So it will give only TRUE in IF condition
If we want to make it as FALSE then use a condition like this IF activity
Hope this would help you resolve this
Do you have any expression that can replace to get if the file exists or not?
I’m using this at the moment > Directory.GetFiles(“C:\Users\luan.carvalho\OneDrive - Solistica\Office\SIGMA CUT\BASE XML”,"" +Row.Item(“DANFE”).ToString + " .xml")
function > fetch an xml file by the reference obtained by the datetable