Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- # Comprobar existencia carpeta Windows:
- print(os.path.exists('C:\\Windows'))
- # Comprueba si un archivo existe:
- print(os.path.exists('C:\\com.bat'))
- # Determinación de tipo de recurso:
- print(os.path.isdir('C:\\Windows'))
- print(os.path.isfile('C:\\Windows\explorer.exe'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement