# File picker for Makie

**URL:** <https://discourse.julialang.org/t/file-picker-for-makie/32295>\
**Category:** Visualization\
**Created:** [December 15, 2019, 7:13am UTC](https://discourse.julialang.org/t/file-picker-for-makie/32295 "2019-12-15T07:13:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miki\_berkovich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miki_berkovich/32/11848_2.png) [@miki\_berkovich](https://discourse.julialang.org/u/miki_berkovich)\
**Post date:** [December 15, 2019, 7:13am UTC](https://discourse.julialang.org/t/file-picker-for-makie/32295/1 "2019-12-15T07:13:49Z")

</div>

hello, i’m new to Makie and i’m trying to build a GUI to plot data from a CSV file.  
to load the file i want the user to choose a CSV and then pars the data to the plot.  
i was looking for something like the “filepicker” from the “interact.jl” pkg. but didn’t find one.  
can i implement the filepicker from interact with in the Makie Scene?  
if not then how can i create a gui to load a CSV file using Makie?  
thanks in ahead  
miki

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [January 25, 2021, 7:49pm UTC](https://discourse.julialang.org/t/file-picker-for-makie/32295/2 "2021-01-25T19:49:17Z")

</div>

I’m curious, did you end up finding a suitable file picker?

---

<div class="post-metadata">

**Author:** ![Daniel\_Lewis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daniel_lewis/32/31250_2.png) [@Daniel\_Lewis](https://discourse.julialang.org/u/Daniel_Lewis)\
**Post date:** [February 15, 2022, 7:13am UTC](https://discourse.julialang.org/t/file-picker-for-makie/32295/3 "2022-02-15T07:13:34Z")

</div>

hi,  
It been a while, but recently I got back to this issue and my workaround for this was as follow:  
for windows I created a .bat file with the following code:

```julia
@echo off
set dialog="about:<input type=file id=FILE><script>FILE.click();new ActiveXObject
set dialog=%dialog%('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);
set dialog=%dialog%close();resizeTo(0,0);</script>"

for /f "tokens=* delims=" %%p in ('mshta.exe %dialog%') do set "file=%%p"
echo %file%

```

finally I created the following julia functions:

```julia
abstract type SysTypes end
struct Windows <: SysTypes end
struct Linux <: SysTypes end

function filebrowser()
    if Sys.iswindows()
        res = filebrowser(Windows)
    end

    if Sys.islinux()
        res = filebrowser(Linux)
    end
    return res
end

function filebrowser(::Type{Windows})
    filetorun = joinpath(@ __DIR__ ,"../aux_files/fileBrowserWindows.bat")
    filename = String(read(`$filetorun`))
    return splitdir(strip(filename,['\r','\n']))
end

function filebrowser(::Type{Linux})
    comm = `zenity --file-selection`
    filename = String(read(comm))
    return splitdir(strip(filename,['\n']))
end

```

hope it is still relevant and help you.

---

<div class="post-metadata">

**Author:** ![photor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/photor/32/14343_2.png) [@photor](https://discourse.julialang.org/u/photor)\
**Post date:** [February 15, 2022, 8:39am UTC](https://discourse.julialang.org/t/file-picker-for-makie/32295/4 "2022-02-15T08:39:28Z")

</div>

That’s great!

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 25, 2024, 5:15pm UTC](https://discourse.julialang.org/t/file-picker-for-makie/32295/5 "2024-03-25T17:15:58Z")

</div>

I am using now this code:

```julia
using GLMakie, NativeFileDialog

fig = Figure(size=(200, 200), backgroundcolor=RGBf(0.7, 0.8, 1))
btn_RUN = Button(fig, label = " Open file... ")
on(btn_RUN.clicks) do c;
    @async begin 
        filename = fetch(Threads.@spawn pick_file(""))
        println(filename)
    end
end
fig

```

which works fine…
