Assign activity issue

Hi All,

i have taken one assign activity(path_var) and storing the filepath loaction, and again one assign activity to replace the name of the file and rename it. now i want to check if that file is available then donot create it just overide it. below img showing what i am trying to to.


how to write the expression in if condition so that it check if file is already there then overide it else rename it.

Hi @Rakesh_Tiwari

Give the below way:

newfilename isnot Nothing

Regards

Hi @Rakesh_Tiwari

Use the File exist activity to check the file exist in the provided path or not. The File exist activity gives the boolean as output, if file exist output is true, if not output is false. Let’s call the variable name as Bool_File.

After file exist activity use the If condition to check the output of File Exist activity.

- Condition -> Bool_File = True

→ In then block insert the activities to override the file.
→ In else block insert the rename file activity to change the file name.

Hope it helps!!

Use Path exists activity

@Rakesh_Tiwari
Use file exist activity to check if particular file present in a folder or not

now, if file exist, how to overide, or no need to do anything, just small doubt.

@Rakesh_Tiwari

If you want to change the existed file then use rename file activity.If you don’t want to change name simply checking if the file present or not ,If it is present then no need to do anything,If it is not present then create a file and perform your operations

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