Open files from a folder open by one using use application-click command

Hi i am trying to open files from a folder using use application-click.
but i am not able to open files from the folder automatically one by one. What is the command i need to use to open file open by one from folder.Is it For each file in a folder?

@vignesh.maruthappan Which type of files you want to open?

Regards,
Ajay Mishra

You can also send the full path (coming from Directory.GetFiles) or the For Each file in Folder, into a “Start Process” activity, that should act the same way as if you manually double click on it.

Option 1:

  • Using Directory.GetFiles, to save the filepaths of the files inside my directory into an array of strings, then inside the foreach opening them one by one

Directory.GetFiles(“Your folder path as string goes here”)

Option 2:

  • Using as you have, the For Each file in folder, yet with a small modification to obtain the full path:
  • Start Process text =

Path.Combine(CurrentFile.Directory.ToString,CurrentFile.FullName)

image

Both methods will have as a result, all the files in the folder opened.

BR,
Ignasi

it is a different application Revit(.rfa)files

that’s great. If i need to open one file. Save close. Then open the second file? What should i do?

after the Start Process activity, you can add your “Use Application” scope, move inside all the actions to be done, including the saving, and closing it inside the same for each, to have it ready for the next file

1 Like

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