# Isfile on Windows problem

**URL:** <https://discourse.julialang.org/t/isfile-on-windows-problem/136620>\
**Category:** General Usage\
**Created:** [April 8, 2026, 12:49pm UTC](https://discourse.julialang.org/t/isfile-on-windows-problem/136620 "2026-04-08T12:49:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JM\_Beckers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jm_beckers/32/22482_2.png) [@JM\_Beckers](https://discourse.julialang.org/u/JM_Beckers)\
**Post date:** [April 8, 2026, 12:49pm UTC](https://discourse.julialang.org/t/isfile-on-windows-problem/136620/1 "2026-04-08T12:49:41Z")

</div>

I have a strange problem. I try to work with files in a directory I access using  
`mypath=raw"C:\users\foo\\" `

and

`isfile(mypath*"afile")`

works with almost all files in the directory but two of them are not reckognised as files under Julia (but well in Windows explorer). When I copy the problematic files to the local Julia working directory by hand and use

`isfile("afile")`

they exist. I also made copies in the `mypath` directory, checked for permissions, used different filenames nothing seem to work when they stay in the `mypath` directory

Any clue what I should look for ?

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [April 8, 2026, 1:03pm UTC](https://discourse.julialang.org/t/isfile-on-windows-problem/136620/2 "2026-04-08T13:03:58Z")

</div>

Is Windows Explorer hiding their extensions?

---

<div class="post-metadata">

**Author:** ![JM\_Beckers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jm_beckers/32/22482_2.png) [@JM\_Beckers](https://discourse.julialang.org/u/JM_Beckers)\
**Post date:** [April 8, 2026, 1:08pm UTC](https://discourse.julialang.org/t/isfile-on-windows-problem/136620/3 "2026-04-08T13:08:30Z")

</div>

No, extensions are shown (and if I toggle them off, they also disappear from the files that are found). The problematic files are also not hidden files. And they open normally with image viewers (all the files, including the readable ones are .png files).  
And I closed all applications and rebooted (should one have blocked the files).

---

<div class="post-metadata">

**Author:** ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)\
**Post date:** [April 8, 2026, 1:17pm UTC](https://discourse.julialang.org/t/isfile-on-windows-problem/136620/4 "2026-04-08T13:17:04Z")

</div>

What is the output of `stat` for (one of) the recognised .png files, the problematic files, and their working directory copies?

---

<div class="post-metadata">

**Author:** ![JM\_Beckers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jm_beckers/32/22482_2.png) [@JM\_Beckers](https://discourse.julialang.org/u/JM_Beckers)\
**Post date:** [April 8, 2026, 1:23pm UTC](https://discourse.julialang.org/t/isfile-on-windows-problem/136620/5 "2026-04-08T13:23:25Z")

</div>

Reckognised files

```julia-auto
   size: 41701 bytes
 device: 1994989972
  inode: 1561872
   mode: 0o100666 (-rw-rw-rw-)
  nlink: 1
    uid: 0
    gid: 0
   rdev: 0
  blksz: 4096
 blocks: 88
  mtime: (1492 days ago)
  ctime: (441 days ago)

```

Problematic file

```julia-auto
ENOENT: no such file or directory

```

locally copied problematic file

```julia-auto
   size: 815600 bytes
 device: 1994989972
  inode: 1936847
   mode: 0o100666 (-rw-rw-rw-)
  nlink: 1
    uid: 0
    gid: 0
   rdev: 0
  blksz: 4096
 blocks: 1600
  mtime: (1 hour ago)
  ctime: (1 hour ago)

```

---

<div class="post-metadata">

**Author:** ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)\
**Post date:** [April 8, 2026, 1:36pm UTC](https://discourse.julialang.org/t/isfile-on-windows-problem/136620/6 "2026-04-08T13:36:18Z")

</div>

I assume `ispath` also returns `false` for the problematic files? Do you recognise anything looking similar to the files when using `readdir(mypath)`?

---

<div class="post-metadata">

**Author:** ![JM\_Beckers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jm_beckers/32/22482_2.png) [@JM\_Beckers](https://discourse.julialang.org/u/JM_Beckers)\
**Post date:** [April 8, 2026, 1:39pm UTC](https://discourse.julialang.org/t/isfile-on-windows-problem/136620/7 "2026-04-08T13:39:13Z")

</div>

Found it, sorry for the noise. I migrated to a new machine some weeks ago and they changed my username but I copied files from the older system not into the new one but the old user directory and there was a mixup in the path…
