# How to use "run()" to open a file?

**URL:** <https://discourse.julialang.org/t/how-to-use-run-to-open-a-file/116331>\
**Category:** General Usage\
**Created:** [June 28, 2024, 3:05am UTC](https://discourse.julialang.org/t/how-to-use-run-to-open-a-file/116331 "2024-06-28T03:05:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lionisxn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lionisxn/32/37989_2.png) [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Post date:** [June 28, 2024, 3:05am UTC](https://discourse.julialang.org/t/how-to-use-run-to-open-a-file/116331/1 "2024-06-28T03:05:34Z")

</div>

I have a figure, say, saved at the path of “D:/1.svg” and want it to be opened via the “msedge.exe” browser in windows 11. The execution of “run(`start D:/1.svg`)” throws error like this

 ![20240628110424](https://global.discourse-cdn.com/julialang/original/3X/5/a/5a29f878a2fc016d2a71c79dd6e9419f24760562.jpeg)

However, I can directly open the figure via the Powershell

 ![20240628110911](https://global.discourse-cdn.com/julialang/original/3X/a/8/a836936a7c071c21ddeee94ba3d462cbe15ecd69.png)

Any idea to tackle it?

---

<div class="post-metadata">

**Author:** ![Mattriks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattriks/32/351_2.png) [@Mattriks](https://discourse.julialang.org/u/Mattriks)\
**Post date:** [June 28, 2024, 3:19am UTC](https://discourse.julialang.org/t/how-to-use-run-to-open-a-file/116331/2 "2024-06-28T03:19:53Z")

</div>

Did you look at: [The "shell mode" in the REPL is not fully functional on Windows · Issue #23597 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/23597) ?

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [June 28, 2024, 5:55am UTC](https://discourse.julialang.org/t/how-to-use-run-to-open-a-file/116331/3 "2024-06-28T05:55:40Z")

</div>

To summarize: `start` is probably not an executable but a powershell builtin. If this is the case there are two options:

1. Find out how powershell translates this into calling an executable and then do that directly from Julia.
2. Call powershell from Julia and instruct it to run the `start` command.

(I’m not a Windows user so can’t help with any details how to do those things.)

---

<div class="post-metadata">

**Author:** ![lionisxn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lionisxn/32/37989_2.png) [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Post date:** [June 28, 2024, 7:30am UTC](https://discourse.julialang.org/t/how-to-use-run-to-open-a-file/116331/4 "2024-06-28T07:30:33Z")

</div>

I just figured out one viable way like this:

> run(`C:/“Program Files (x86)”/Microsoft/Edge/Application/msedge.exe D:/1.svg`)
