python中可以用os.walk来遍历某个文件夹中所有文件夹和文件. 例1: import os filePath = 'C:/Users/admin/Desktop/img' for dirpath, dirnames, filenames in os.walk(filePath): print(dirpath, dirnames, filenames) 输出结果: 例2: import os filePath = 'C:\\Users\\admin\\Desktop\\img' for d
class Program { static double size = 2.443438914027149; static void Main(string[] args) { if (!System.IO.Directory.Exists("Img")){ System.IO.Directory.CreateDirectory("Img"); Console.WriteLine("已创建Img目录,请把需要处理的图片放到该目录下"); Con