用bat编写一个将文件名重命名为文件夹名的脚本
@echo off setlocal enabledelayedexpansion
for /d %%a in (*) do ( set "folder=%%a" for %%b in ("%%a*") do ( set "file=%%~nb" set "ext=%%~xb" ren "%%b" "!folder!_!file!!ext!" ) )
echo Renaming complete. pause>nul exit
原文地址: http://www.cveoy.top/t/topic/dTT0 著作权归作者所有。请勿转载和采集!