# Start Win Explorer with folder

**URL:** https://discourse.processing.org/t/start-win-explorer-with-folder/41901
**Category:** Coding Questions
**Created:** [May 3, 2023, 1:18pm UTC](https://discourse.processing.org/t/start-win-explorer-with-folder/41901 "2023-05-03T13:18:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [May 3, 2023, 1:18pm UTC](https://discourse.processing.org/t/start-win-explorer-with-folder/41901/1 "2023-05-03T13:18:25Z")

</div>

hello all,

how can I start Win explorer with explorer?

I read this: [Parameter des Windows Explorers "explorer.exe" - Windows FAQ](https://www.windows-faq.de/2018/10/04/parameter-des-windows-explorers-explorer-exe/)

but this doesn’t work

```auto
    launch ( "explorer.exe"+
      " /n," +
      sketchPath("")+""+pathFolder+"\\" );

```

OR

```auto
try
    {
      ProcessBuilder pb = new ProcessBuilder("explorer", " ", "/n,", sketchPath("")+""+pathFolder+"\\");
      Process p = pb.start();
    }
    catch ( Exception e ) // IOException, URISyntaxException
    {
      e.printStackTrace();
    }//catch

```

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [May 3, 2023, 11:10pm UTC](https://discourse.processing.org/t/start-win-explorer-with-folder/41901/2 "2023-05-03T23:10:42Z")

</div>

Hello @chrisir,

Reference:  
[https://ss64.com/nt/explorer.html](https://ss64.com/nt/explorer.html)

Example:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/8/4/84ba73b89efb1d22f2f44b69e88038995d1640c6.png)

This will open sketch folder:

```auto
launch ("explorer.exe" + 
        ' ' +
        '"' +
        sketchPath("") +
        '"');

```

`:)`

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [May 4, 2023, 8:02am UTC](https://discourse.processing.org/t/start-win-explorer-with-folder/41901/3 "2023-05-04T08:02:34Z")

</div>

That worked! Thanks a lot!

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [May 4, 2023, 10:11am UTC](https://discourse.processing.org/t/start-win-explorer-with-folder/41901/4 "2023-05-04T10:11:12Z")

</div>

These all work as well:

```auto
// https://processing.org/reference/String.html
// https://processing.org/reference/launch_.html
// https://ss64.com/nt/explorer.html

// **********************************************  

launch ("explorer.exe" + 
        "/n," + //No spaces!
        sketchPath(""));
 
// **********************************************        
        
String s = "explorer.exe" + 
        "/n," + //No spaces!
        sketchPath("");
        
println(s);        
launch(s);

// ********************************************** 

String sp = sketchPath("");
String args [] = {"explorer.exe", "/n,", sp};
launch(args);

```

`:)`

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [February 5, 2024, 4:52pm UTC](https://discourse.processing.org/t/start-win-explorer-with-folder/41901/5 "2024-02-05T16:52:39Z")

</div>

Thank you!

This is the code to launch **Notepad** under Win 10

```auto
  case '2':
    String s = "notepad.exe" +
      " " + //
      dataPath("")
      +"\\"
      + "keywords.tsv"; //

    println(s);
    launch(s);

    break;

```

and Firefox

```auto
case '1':
    String [] a1 = new String [2];
    a1[0]= "C:\\Program Files\\Mozilla Firefox\\firefox.exe";
    a1[1]= "www.youtube.com" ;
    launch(a1); // launch:www.youtube.com
    break;

```
