首页->【软件工具包使用(SW/Software Tools Usage)】

17 0


::for generate the exeLib files to simulate
::19/01/04
::Winyoo_Shiy@SH.TRY
::@echo off
:: set the color
:: FUNCTION
:: del the version code for Vx
::
set DIR_PATH=F:\DesktopSHi\patNameMotified
setlocal enabledelayedexpansion
set  var=0
color 2            
for /f "tokens=* delims=" %%a in ('dir /a-d/s/b %DIR_PATH%\*.pat') do  (
         set c=%%~na
         ::set spath=%%~pa
         for /f "tokens=1,2,3,4 delims=\" %%i in ("%%~pa") do (
             set spath=%%~da\%%i\%%j\%%k
         )
         set "b=!c:_V2=!"
         cd !spath!
         ren "%%~na.pat"   "!b!.pat"       
)
pause
::end of file
::echo ==%%i,%%j,%%k,%%m==
::echo ==!spath!====
:: 实例如图所示

图片.png

作者于2019-01-05 21:06:14修改!
楼主可见