Hey,
I created a process that identifies a .txt file
but if the .txt file is empty, the robot will terminate the process
how do i create the condition inside the if/else
I tried to put the file inside a variable with file exist and I did the logic:
Benef.ToString is Null , but not successful
use read text file activity to read file to string variable eg “txt”
then check if String.isNullOrEmpty(txt)
1 Like
ppr
(Peter Preuss)
3
Checking the filesize:
new FileInfo(YourFilePath).Length = 0
Checking the file content after trimming
File.ReadAllText(YourFilePAth).Trim().Length = 0
Hi @jack.chan,
After reading the file, you can check it with the following method.
String.IsNullOrEmpty(outputTxt)
Regards,
MY