# Windows, simple way of gettting path to package with single backslashes

**URL:** <https://discourse.julialang.org/t/windows-simple-way-of-gettting-path-to-package-with-single-backslashes/22906>\
**Category:** General Usage\
**Created:** [April 8, 2019, 8:33am UTC](https://discourse.julialang.org/t/windows-simple-way-of-gettting-path-to-package-with-single-backslashes/22906 "2019-04-08T08:33:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timmm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/timmm/32/6760_2.png) [@timmm](https://discourse.julialang.org/u/timmm)\
**Post date:** [April 8, 2019, 8:33am UTC](https://discourse.julialang.org/t/windows-simple-way-of-gettting-path-to-package-with-single-backslashes/22906/1 "2019-04-08T08:33:22Z")

</div>

For example, when I have a package called ‘MyPackage’  
then I call this to get the package directory

```julia
pathof(MyPackage)
"C:\\Users\\User\\.julia\\packages\\MyPacakge\\ouQ51\\src\\MyPackage.jl"

```

If I want to paste this into windows explorer i need single backslashes.  
Trying ‘replace’ doesnt work  
i.e.

```julia
replace(pathof(MyPackage),"\\","\")

```

because the REPL doesn’t think the line is finished when return is pressed.

Tim

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [April 8, 2019, 8:42am UTC](https://discourse.julialang.org/t/windows-simple-way-of-gettting-path-to-package-with-single-backslashes/22906/2 "2019-04-08T08:42:40Z")

</div>

Try `println`

```julia
julia> a = "C:\\Users\\User\\.julia\\packages\\MyPacakge\\ouQ51\\src\\MyPackage.jl"
julia> println(a)
C:\Users\User\.julia\packages\MyPacakge\ouQ51\src\MyPackage.jl

```

(PS: I did this on mac so YMMV but I think it should be the same on win)

---

<div class="post-metadata">

**Author:** ![timmm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/timmm/32/6760_2.png) [@timmm](https://discourse.julialang.org/u/timmm)\
**Post date:** [April 8, 2019, 8:44am UTC](https://discourse.julialang.org/t/windows-simple-way-of-gettting-path-to-package-with-single-backslashes/22906/3 "2019-04-08T08:44:12Z")

</div>

Yes its the same on Windows. That is also a very simple solution.  
Thanks.
