本帖最后由 qixiaobin0715 于 2023-11-18 10:52 编辑
假设文件所在的总目录为:C:\Users\Administrator\Desktop\123
目标目录为:C:\Users\Administrator\Desktop\abc
批处理文件保存为ANSI编码。- @echo off
- set BDCQJDCB=权籍调查表
- set FCFHT=房屋平面图
- set JZDB=界址点坐标
- set SQS=不动产登记申请书
- set ZDT=宗地图
- set ZJWJ=其他材料
- set "Folders=C:\Users\Administrator\Desktop\abc"
- cd /d "C:\Users\Administrator\Desktop\123"
- setlocal enabledelayedexpansion
- for /f "tokens=1* delims=_" %%i in ('dir /s /b /a-d *_*.*') do (
- move "%%i_%%j" "%Folders%\%%~ni\%%~ni_!%%~nj!\">nul 2>nul
- )
- pause
复制代码
|