# \`file.choose()\` in \`Julia\`?

**URL:** <https://discourse.julialang.org/t/file-choose-in-julia/69703>\
**Category:** New to Julia\
**Tags:** filesystem, io, gui\
**Created:** [October 13, 2021, 5:15pm UTC](https://discourse.julialang.org/t/file-choose-in-julia/69703 "2021-10-13T17:15:07Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Jordan\_Cluts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jordan_cluts/32/13753_2.png) [@Jordan\_Cluts](https://discourse.julialang.org/u/Jordan_Cluts)\
**Post date:** [October 13, 2021, 8:20pm UTC](https://discourse.julialang.org/t/file-choose-in-julia/69703/9 "2021-10-13T20:20:36Z")

</div>

I wrote [this](https://gist.github.com/jordancluts/31bd407f3f85a3557d9308313758625e) monstrosity a few years ago for my use on Windows. It shells out to PowerShell to create a file dialog then parses the results. Needed a tweak to get the `uigetfile` function working again (I’m using PS7 compared to PS5 when I wrote it) the others would probably need tweaks too. Obviously ugly and could be done better (I’m a much better Julia programmer now) but does get the job done (on Windows). I wonder how hard it’d be to whip up a package, atleast for a specific OS.

I haven’t used this code in a few years as I mostly work in notebooks now and so my filepaths are stored in a cell for convenience and reproducibility of the notebook.

edit to add that this doesn’t “open” the file it just returns the path as a string or an array of strings if you select multiple files. Makes it a tad easier to get a variable with your filepath in the REPL is all.

---

_[View the full topic](https://discourse.julialang.org/t/file-choose-in-julia/69703)._
