Hide folder with Python 05-10-2019, 10:14 AM
#1
Hi Hi,
i am looking for variants how to hide folders with python..
I've already worked out a solution.
Does someone know other possibilities to hiden folders with python?
It is possible to create a folder in the system32 windows folder (see path3 Â to bypass this error PermissionError: [WinError 5] Access is denied)
I'm sorry for my bad english.
i am looking for variants how to hide folders with python..
I've already worked out a solution.
Code:
import shutil
import os
import win32con
import win32api
path1=r"C:\Users\user1\Desktop\5"
path2=r"C:\Users\Administrator\Dokumente\Word"
#path3=r"C:\Windows\System32\Test"
path_exist=os.path.exists(path2)
if path_exist==True:
  print("Ok")
else:
  shutil.copytree(path1,path2)
  print("copy from ", path1)
  print("copy to: ",path2)
win32api.SetFileAttributes(path2,win32con.FILE_ATTRIBUTE_HIDDEN) #Verstekct den Ordner
print("hiden")Does someone know other possibilities to hiden folders with python?
It is possible to create a folder in the system32 windows folder (see path3 Â to bypass this error PermissionError: [WinError 5] Access is denied)
I'm sorry for my bad english.
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)











