Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

import os in python

#import os in python: a realized way.
import os
path= "C:Users88013DesktopNew folder"

if os.path.exists(path):
    print("We got that information")
if os.path.isfile(path):
    print("This is a text file format")
elif os.path.isdir(path):
    print("This is a Folder")
else:
    print("Find the File in Hard-Disk")
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #import #os #python
ADD COMMENT
Topic
Name
7+1 =