# Running .jl file from PowerShell

**URL:** <https://discourse.julialang.org/t/running-jl-file-from-powershell/63462>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 23, 2021, 7:49pm UTC](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462 "2021-06-23T19:49:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amro](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Amro](https://discourse.julialang.org/u/Amro)\
**Post date:** [June 23, 2021, 7:49pm UTC](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462/1 "2021-06-23T19:49:40Z")

</div>

Hello,

I am having the below error when I am trying to open .jl file from the PowerShell"

 ![Capture](https://global.discourse-cdn.com/julialang/original/3X/b/8/b890bedc983de05c35ceb385bb9252e2c3205123.png)

Any recommendation to solve it?  
Thanks!

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [June 23, 2021, 7:51pm UTC](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462/2 "2021-06-23T19:51:33Z")

</div>

please gain some basic understanding regarding filesystem, path etc before posting multiple questions around the same topic.

In this case you can see your files is in `C:\Work\Julia\Simulation\Tests`

but your powershell is at `C:\Users\amroa\`, of course it’s not gonna work, because the way you’re running the Julia command, it’s trying to execute the file `C:\Users\amroa\Test1.jl`

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [June 23, 2021, 7:54pm UTC](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462/3 "2021-06-23T19:54:42Z")

</div>

Best is to change the working directory before running Julia.  
In the powershell:

```julia
cd c:\Work[TAB]

```

[TAB]means press TAB to use tab-completion.  
Go through until you are in  
C:\Work\Julia\Simulation\Tests

---

<div class="post-metadata">

**Author:** ![Amro](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Amro](https://discourse.julialang.org/u/Amro)\
**Post date:** [June 23, 2021, 7:59pm UTC](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462/4 "2021-06-23T19:59:05Z")

</div>

![Capture](https://global.discourse-cdn.com/julialang/original/3X/d/f/df059446e01bbd7ecc2929d20b1d3ae4208aeb6e.png)  
I opened PowerShell in the same path of the .jl file as in the figure, but it didnt run julia neither the .jl file

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [June 23, 2021, 8:00pm UTC](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462/5 "2021-06-23T20:00:16Z")

</div>

Put some println(“kisdhfksfbk”) into Test1.jl, to see some output.

---

<div class="post-metadata">

**Author:** ![Amro](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Amro](https://discourse.julialang.org/u/Amro)\
**Post date:** [June 23, 2021, 8:02pm UTC](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462/6 "2021-06-23T20:02:17Z")

</div>

Thank you very much!  
Yes, it works
