# Run command error in Windows 10

**URL:** <https://discourse.julialang.org/t/run-command-error-in-windows-10/51314>\
**Category:** New to Julia\
**Created:** [December 5, 2020, 6:44pm UTC](https://discourse.julialang.org/t/run-command-error-in-windows-10/51314 "2020-12-05T18:44:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jake](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jake/32/46007_2.png) [@Jake](https://discourse.julialang.org/u/Jake)\
**Post date:** [December 5, 2020, 6:44pm UTC](https://discourse.julialang.org/t/run-command-error-in-windows-10/51314/1 "2020-12-05T18:44:16Z")

</div>

I was going through the examples in [Running External Programs · The Julia Language](https://docs.julialang.org/en/v1/manual/running-external-programs/) and found some that worked on a Raspberry Pi but errored on Windows 10. In both instances I was working from the REPL.

mycommand = `echo hello` works just fine on each system

run(mycommand) works as expected on the Raspberry Pi installation but throws an error on Windows

julia\> run(mycommand)  
ERROR: IOError: could not spawn `echo hello`: no such file or directory (ENOENT)  
Stacktrace:  
[1] \_spawn\_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99  
[2] #585 at .\process.jl:112 [inlined]  
[3] setup\_stdios(::Base.var"#585#586"{Cmd}, ::Array{Any,1}) at .\process.jl:196  
[4] \_spawn at .\process.jl:111 [inlined]  
[5] run(::Cmd; wait::Bool) at .\process.jl:439  
[6] run(::Cmd) at .\process.jl:438  
[7] top-level scope at REPL[22]:1

Any ideas?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [December 5, 2020, 7:20pm UTC](https://discourse.julialang.org/t/run-command-error-in-windows-10/51314/2 "2020-12-05T19:20:49Z")

</div>

There is no program `echo` on Windows, see e.g. [Run(cmd) manual examples throw error](https://discourse.julialang.org/t/run-cmd-manual-examples-throw-error/49916).

Should probably be more explicit about this in the manual since apparently many users misunderstands this.

---

<div class="post-metadata">

**Author:** ![Jake](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jake/32/46007_2.png) [@Jake](https://discourse.julialang.org/u/Jake)\
**Post date:** [December 5, 2020, 9:58pm UTC](https://discourse.julialang.org/t/run-command-error-in-windows-10/51314/3 "2020-12-05T21:58:16Z")

</div>

at the command prompt of Windows I type

echo hello  
and it responds with  
hello

echo /? gives the usage of echo in Win 10.

---

<div class="post-metadata">

**Author:** ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Post date:** [December 5, 2020, 10:22pm UTC](https://discourse.julialang.org/t/run-command-error-in-windows-10/51314/4 "2020-12-05T22:22:21Z")

</div>

`echo` is an internal command of `cmd`, not a callable executable in Windows.  
Look at the solution to link provided in previous post.

---

<div class="post-metadata">

**Author:** ![Jake](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jake/32/46007_2.png) [@Jake](https://discourse.julialang.org/u/Jake)\
**Post date:** [December 6, 2020, 2:37am UTC](https://discourse.julialang.org/t/run-command-error-in-windows-10/51314/5 "2020-12-06T02:37:39Z")

</div>

You are vaguely reviving my DOS memories. I understand now, and agree that the documentation should mention the internal commands vs. the external ones that are callable and give the example from the previous post…
