# Strange file open error on windows

**URL:** <https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756>\
**Category:** General Usage\
**Created:** [December 17, 2018, 5:31pm UTC](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756 "2018-12-17T17:31:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![purplishrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/purplishrock/32/13451_2.png) [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Post date:** [December 17, 2018, 5:31pm UTC](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756/1 "2018-12-17T17:31:10Z")

</div>

I got a file open error trying to access a file on a windows network drive.

julia said it could not open the file because the file does not exist, however the file DOES exist.

Now, the first time this happened windows was also giving me weirdness saying that the file didn’t exist when i tried to open it, but that’s since stopped.

so the first thing i thought was that the filename was too long. However i shortened the file name and still had the same problem.

So far i’ve had precisely one file (and there are a LOT of files on this network drive) do this. I did verify that the filename being handed back in the error message is the same filename that i tried to open. also i made sure to check for potentially invalid characters.

Does anybody have any ideas ??

Thanks!

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 17, 2018, 7:38pm UTC](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756/2 "2018-12-17T19:38:30Z")

</div>

> [@purplishrock](#):
>
> Does anybody have any ideas ??

Try to obtain an MWE, along the lines of

```julia
filename = ...
write(filename, "testing")
read(filename, String) # ERROR

```

with Windows version and all relevant details.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [December 17, 2018, 9:03pm UTC](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756/3 "2018-12-17T21:03:43Z")

</div>

Ok. Try to open the directory in which the file is located using Explorer. Keep the explorer window open and try again.

---

<div class="post-metadata">

**Author:** ![purplishrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/purplishrock/32/13451_2.png) [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Post date:** [December 18, 2018, 12:06am UTC](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756/4 "2018-12-18T00:06:36Z")

</div>

Well it’s a weird windows problem.

I shortened the name of the file AND the containing directory (which was also very long) and the problem disappeared.

I suspect that the fact that it was a network drive contributed to the trouble in some way.

I would debug this if i thought it might be a julia issue, but considering that windows was giving us the same sort of trouble (my colleague tried to open the file with a different tool and ran into the same problem) i think i’ll just let it go.

---

<div class="post-metadata">

**Author:** ![Daniel.C.Li](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Daniel.C.Li](https://discourse.julialang.org/u/Daniel.C.Li)\
**Post date:** [December 18, 2018, 6:02am UTC](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756/5 "2018-12-18T06:02:43Z")

</div>

> [@purplishrock](#):
>
> eared.
> 
> I suspect that the fact that it was a network drive contributed to the trouble in some way.
> 
> I would debug this if i thought it might be a julia issue, but considering that windows was giving us the same sort of trouble (my colleague tried to open the file with a different tool and ran into the same problem) i think i’ll just let it

It is indeed related to Windows, particularly as the file is in network drive. I am having the same issue in other tools, including powershell and Excel VBA.

---

<div class="post-metadata">

**Author:** ![braamvandyk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/braamvandyk/32/5086_2.png) [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Post date:** [December 18, 2018, 7:00am UTC](https://discourse.julialang.org/t/strange-file-open-error-on-windows/18756/6 "2018-12-18T07:00:15Z")

</div>

Try mapping a drive letter to the network folder.
