How to check if file exist's with sequence?

Hi All,

I have in need to add-on the below workflow to my current automation:-

  1. Check if file exist (File Path: “C:\Users\Downloads\SO_File_”+Now.ToString(“ddMMyyyy”)+“.xlsx”)
  2. If file does not exist, end/exit the entire run
  3. If file exists, continue to next process (within the same flow chart)

*I checked the Path Exists documentation but do not know what input to put inside the activity and the variable info
Below are my screenshot, would appreciate the help.


image

Hi @Jackson_Hew

Use File Exists activity and configure it like below and save the output to a variable say FileExists. Use Flow Decesion and pass the output variable of File Exists. If it’s true you can continue the process by mapping it to Excel Process Scope or if it’s False you can end the process by keeping Log Message.

Uploading the workflow for better understanding
Flowchart1.xaml (12.4 KB)

Let me know if you have any queries

Regards

Hi @vrdabberu

Thanks for the reply!

However, I could not open your xaml file

I have tried to recreate based on your image reference.
image

What activity do I put under false to end if file does not exist?

Hi @Jackson_Hew

A log message in the False would help you identify that file is not present.

Regards

I see, but i wish to exit/end the entire process if the file does not exist.

If false, will the message log end the entire process job?



@Jackson_Hew

Yes keeping Log message will end your process.

Regards

1 Like

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