Stranger things : upside down filesystem, in python console?

I have a very strange problem, make me crazy

I’am using Spyder Ananconda on WIN 10.

when i create directory in command line console or with a script, everything things seem to be ok.

mkdir mydir
cd mydir
Le volume dans le lecteur D s’appelle DATA
Le num‚ro de s‚rie du volume est 2CC9-E098

 R‚pertoire de D:\mydir

15/02/2023  10:54    <DIR>          .
15/02/2023  10:54    <DIR>          ..
               0 fichier(s)                0 octets
               2 R‚p(s)  1ÿ868ÿ357ÿ693ÿ440 octets libres

I test with the following script

-- coding: utf-8 --

Spyder Editor
“”"#python program to check if a directory exists
import os
path = “D:\mydir”

Check whether the specified path exists or not

isExist = os.path.exists(path)
#printing if the path exists or not
if isExist :
print(“directrory :'”+path+“’ exist”)

Console output is ok :

 runfile('C:/Users/Oliv/.spyder-py3/', wdir='C:/Users/Oliv/.spyder-py3')  
 directrory :'D:\mydir' exist

But outside python, in windows filesystem there is no change, my new directory ‘D:\mydir’
does not exist :scream:

it’s look like, python has a kind of cached file system, which never syncing to write to windows file system

Someone could help, I missed somthing in anaconda parameters ?

same things with different install versions :

  • Spyder 4.2.5 (Python 3.8)/ Anaconda Nav 2.0.3 (Anaconda3-2021.05-Windows-x86_64.exe)
  • Spyder 5.2.2 (Python 3.9.13) / IPython 7.31.1 / Anaconda Nav 2.3.1 (Anaconda3-2022.10-Windows-x86_64.exe)

same behavior inide JupyterLab 3.4.4… renaming files or folder in the gui works only for the ‘python’ side , nothing change into windows file explorer. It’s seems to be persistant after rebooting the PC or uninstall/ reinstall anaconda, folders are still there in python and nothing in windows side…