# Simplest way to launch a file browser

**URL:** <https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047>\
**Category:** General Usage\
**Created:** [July 24, 2023, 10:41pm UTC](https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047 "2023-07-24T22:41:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [July 24, 2023, 10:41pm UTC](https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047/1 "2023-07-24T22:41:50Z")

</div>

Is there some **extremely** lighweight package that allows choosing a file that will be an input to a function in some “point and click” way?

(It is really hard to make Windows users happy with anything that requires typing, and for some reason Windows makes all efforts to hide the true paths of the files).

Maybe: how dependency-independent can be a function that launches a browser and shows a page with a simple form that runs a function in background?

I want the users just to use something like:

```julia
julia> run_function("C:\\users\\myname\\Downloads\\inputfile.inp")

```

and requiring typing the path is pain on Windows, because you have to provide a video showing people how to get the path, and then ask them to add the double back slashes.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [July 24, 2023, 10:58pm UTC](https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047/2 "2023-07-24T22:58:51Z")

</div>

For the file input part, does the [NativeFileDialog.jl](https://github.com/JuliaGraphics/NativeFileDialog.jl) package help?

---

<div class="post-metadata">

**Author:** ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Post date:** [July 24, 2023, 11:01pm UTC](https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047/3 "2023-07-24T23:01:36Z")

</div>

A side-note on Windows filepaths: you can avoid needing to add backslashes by preprending `raw` to the string.

```julia-repl
julia> raw"C:\Users\MyName\Downloads\inputfile.inp"
"C:\\Users\\MyName\\Downloads\\inputfile.inp"

```

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [July 25, 2023, 12:04am UTC](https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047/4 "2023-07-25T00:04:33Z")

</div>

@lmiq any chance this is related to Pluto.jl? Are you launching the browser to start a Pluto session?

There are ways to create a Windows batch or Linux shell script to automate the task with mouse clicks.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [July 25, 2023, 1:08am UTC](https://discourse.julialang.org/t/simplest-way-to-launch-a-file-browser/102047/5 "2023-07-25T01:08:11Z")

</div>

No, not really. What @rafael.guerra suggested is what I was searching for, just opening a dialog, because I found that the easiest way to provide cross-platform executables for a Fortran package is to use BinaryBuilder.jl and make a thin wrapper to it. With the file browser being launched I think Windows users will finally run it easily. ([GitHub - m3g/Packmol.jl: The future of Packmol](https://github.com/m3g/Packmol.jl#interactive-use)).

(I’m not sure if the NativeFileDialog is lightweight, but it installs and runs quickly at least).

edit: it seems to be a pretty large dependency, but still much easier (on Windows) than compiling the package. For now I’m happy with it.
