How to open file explorer?

I need to open the file explorer and search dynamic file there, therefore I need only to open the file explorer window, is there any activity make this ?
I used some activity called “Browse for file” but when I put the path there is an error.

Hi @mironb

may i know what are you trying to perfom? because we have lot of studio activities that does not require the use of the file explorer

As I said, I need to search dynamic file that created in specific folder.
Therefore I need to open the file explorer window.
In the 2nd stage I will search the file in the search field

Hi @mironb

You can use below code to get all the file names inside a folder,
FileNames (Array of String variable type) = System.IO.Directory.GetFiles("PassYourFolderPath").Select(Function(x) System.IO.Path.GetFileNameWithoutExtension(x)).ToArray()

You can print the file names in a write line using below code,
String.Join( Environment.NewLine, FileNames)

And if you want to check a file exist based on a file name then check below code,
FileExist (Boolean variable type)= FileNames.Any(Function(f) f.Equals("FileNameToSearch"))

Hope this might help you :slight_smile:

Hi @Manish540
Thanks, But I need as I wrote.
The file I want to open is a dynamic one and create after 15 minutes.
Therefore I need to use add queue item and then navigate to the search field in the file explorer.

Hi @mironb

Check this below link,

Hope this might help you :slight_smile:

hi @mironb ,

Use Start Process Activity :slight_smile:

  1. Explorer.exe can open the File Manager for You
  2. If you want to open a Specific folder - Pass the Folder Path shown below. The Second Parameter is Optional - You can leave it Blank

image


Mukesh

Hi @mukeshkala
I used it also and its open the file explorer but in addition it throw an error
image

  1. Just Try with “explorer” : I tried - This works for me wihout exception
  2. Make sure you / robot has admin access
  3. Lastly - If the Explorer is Opened - You can Ignore the Error by Marking as “Continue on Error : TRUE” (Not a Good Practice)


Mukesh

@mukeshkala
Thanks - Its works

1 Like

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