Isfile on Windows problem

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 ?

Is Windows Explorer hiding their extensions?

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).

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

Reckognised files

   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

ENOENT: no such file or directory

locally copied problematic file

   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)

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

1 Like

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…

1 Like