zoukankan      html  css  js  c++  java
  • shutil.rmtree() 分类: python 小练习 20130521 17:11 4344人阅读 评论(0) 收藏


    #如果存在以下树结构:

                                                    | ---- a.txt              | ----picturc

                              | -- folder1 ----| -----folder_1 -----| ------ entertainment


    G:----test -----  | --- folder2 ---music.mp3


                              | ---- folder3 --works

                              .............

                              ..............

    即 G:\test 目录下存在多级子目录


    如果要递归删除G:\test 目录的内容,可使用shutil.rmtree()函数

    import shutil

    shutil.rmtree(r'G:\test') 


    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    RoIPooling、RoIAlign笔记
    ROI Align 的基本原理和实现细节
    ROI Align详解
    GIT总结
    java-变量,函数 下
    linux设置静态ip地址
    技术参考网站-网址
    python
    python
    python
  • 原文地址:https://www.cnblogs.com/think1988/p/4628188.html
Copyright © 2011-2022 走看看