Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python makedir

def mkdir(path):
    import os
    path=path.strip()
    path=path.rstrip("")
    isExists=os.path.exists(path)
    
    if not isExists:
        os.makedirs(path) 
        print path+' 创建成功'
        return True
    else:
        print path+' 目录已存在'
        return False

mkpath="d:qttcweb"
mkdir(mkpath)
 
PREVIOUS NEXT
Tagged: #python #makedir
ADD COMMENT
Topic
Name
5+2 =