【自用-nim语言】批量删除文件夹里的.png图片命令行(语言版本2.2.2)

# 遍历文件夹,删除所有.png文件
import std/os
import std/strutils

var args = commandLineParams()
var dir = args[0]

for filePath in walkDirRec(dir,yieldFilter={pcFile}):
  if filePath.endsWith(".png"):
    removeFile(filePath)

 https://gitee.com/h128/png_cleaner

posted on 2025-12-09 16:53  小沙盒工作室  阅读(2)  评论(0)    收藏  举报