Open a Single File

Hi,
How to open a single specific file from a specific folder which contains many files?

Hi @ADITYA_MUKHERJEE

Use Directory.GetFiles(“PathOfFile”)

Regards,
Kommi Jeevan.

can you please elaborate?

@ADITYA_MUKHERJEE
in other hands you can use the click activity.
indicate on screen option=> indicate that specific file (which one is you want to open)…

1 Like

Use Start Process Activity Pass the path of the file.

image

Use Assign Activity

filelist = Directory.GetFiles(“Path”)

filelist data type is a string of array

For each activity

item filelist

Use start process activity pass item.

hi @ADITYA_MUKHERJEE you can also use Directory.GetFiles(“PathOfFile”) this expression in assign activity…
in to field create one variable and use the above expression in VB expression field… as @kommijeevan told

1 Like

this will open all the files in that path right?
but i want to open only a specific file in that path.

Use Start Process Activity Pass the path of the file.

image

specific file means what will be the extension of that file ?
@ADITYA_MUKHERJEE

.xlsx, excel files.

No worries.

  1. assign Variable “str_getfiles=new FileInfo(item.tostring)”
    2.assign another varibale “str_type=Path.GetExtension(item.tostring)”
    3.IF
    str_type=“.xlsx”

then your workflow.

@ADITYA_MUKHERJEE

chrees :slight_smile:

1 Like

mark solution if you got your answer so that it will help others.
@ADITYA_MUKHERJEE

1 Like

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