【练习】用python写一个计算文件夹总大小的程序
2021-04-26 19:28
阅读:524
            
                         标签:for   lis   list   大小   get   imp   filename   pytho   程序    【练习】用python写一个计算文件夹总大小的程序 标签:for   lis   list   大小   get   imp   filename   pytho   程序    原文地址:https://www.cnblogs.com/uuuuuuuuuuuuuuuu/p/13251441.htmlimport ossize=0filename=‘输入你的文件夹绝对路径‘for g in os.walk(filename):path, dir_list, name_list=gfor name in name_list:abs_path=os.path.join(path,name)size+=os.path.getsize(abs_path)print(‘文件总大小:%s‘%size)
                    文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:【练习】用python写一个计算文件夹总大小的程序
文章链接:http://soscw.com/index.php/essay/79887.html
            文章标题:【练习】用python写一个计算文件夹总大小的程序
文章链接:http://soscw.com/index.php/essay/79887.html
评论
亲,登录后才可以留言!