Fhernd icon

comprobar-existencia-archivo-carpeta.py

Fhernd | PRO | 07/14/18 12:20:04 PM UTC | 0 ⭐ | 2671 👁️ | Never ⏰ | []
Python |

290 B

|

None

|

0 👍

/

0 👎

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

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎