本帖最后由 batman 于 2012-12-27 22:31 编辑
- @echo off&setlocal enabledelayedexpansion
- set "homepath=D:\LT_BSS\HB\20120615_0613\Billing"
- set "subpath=BSS4.2\billing\core_hb\src\rate\base"
- set "subpath=%subpath: =$@#%"
- for %%a in (%subpath:\= %) do (
- set "str=%%a"
- if exist "!homepath!\!str:$@#= !" (
- set "homepath=!homepath!\!str:$@#= !"
- ) else (
- goto next
- )
- )
- :next
- echo 匹配路径至%homepath%
- pause>nul
复制代码
|