What I try to do is I want to check my_new_folder exists or not with smbclient first before I create it.
import smbclient
username = 'username' # Domain user name
password = "password" # Domain user password
smbclient.register_session(server="remote_server_name", username=username, password=password, port=445,auth_protocol='ntlm')
new_shared_subfolder_path="//remote_server_name/existing_shared_folder/my_new_folder"
## How to check new_shared_subfolder_path exists or not with smbclient, before I create it?
smbclient.mkdir(new_shared_subfolder_path)
Thank you very much!
smbclient.makedirs(my_new_folder , exist_ok=True)
2.
print(smbclient.path.exists(file_path))
print(smbclient.path.isdir(file_path))