# Symlink can not create hardlink in windows10

**URL:** https://discourse.julialang.org/t/symlink-can-not-create-hardlink-in-windows10/75702
**Category:** General Usage
**Tags:** windows
**Created:** [February 3, 2022, 6:06am UTC](https://discourse.julialang.org/t/symlink-can-not-create-hardlink-in-windows10/75702 "2022-02-03T06:06:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![babaq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/babaq/32/891_2.png) [@babaq](https://discourse.julialang.org/u/babaq)
#### Post date: [February 3, 2022, 6:06am UTC](https://discourse.julialang.org/t/symlink-can-not-create-hardlink-in-windows10/75702/1 "2022-02-03T06:06:27Z")

</div>

I tried `mklink link target` and `mklink \h link target` in windows CMD, and it works fine.

But when using `symlink(target, link)`, it always creates soft link regardless of absolute/relative path.

Is anyone have similar experience and know how to create hardlink?

I am using Julia v1.7.1

---

<div class="post-metadata">

### Author: ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)
#### Post date: [February 3, 2022, 8:34am UTC](https://discourse.julialang.org/t/symlink-can-not-create-hardlink-in-windows10/75702/2 "2022-02-03T08:34:13Z")

</div>

Hard links are not symbolic links, so I would not expect `symlink` to create hard links? (see the Microsoft [documentation](https://docs.microsoft.com/en-us/windows/win32/fileio/hard-links-and-junctions)).

There will be a `hardlink` function in Julia 1.8:

[https://github.com/JuliaLang/julia/pull/41639](https://github.com/JuliaLang/julia/pull/41639)

---

<div class="post-metadata">

### Author: ![babaq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/babaq/32/891_2.png) [@babaq](https://discourse.julialang.org/u/babaq)
#### Post date: [February 3, 2022, 5:37pm UTC](https://discourse.julialang.org/t/symlink-can-not-create-hardlink-in-windows10/75702/3 "2022-02-03T17:37:31Z")

</div>

You are right, The symlink use both symboliclink and junction point. It’s good to know a hardlink function will be in the v1.8.

Thanks.
