Batch processing of file name modification

Time:2020-8-9
Copy codeThe code is as follows:
@echo off & setlocal enabledelayedexpansion
Echo – = = file name replacement (remove the_ V2 and_ V3)==-
echo.
echo.

Set / P folder = please enter a path:

for /r %folder% %%i in (*) do (
set file=%%i
set file=!file:_v2=!
set file=!file:_v3=!
if %%i neq !file! (move “%%i” “!file!”)
)

echo.
echo.
Echo all filenames are replaced.
Echo press any key to exit.
pause>nul

Recommended Today

Differences between single line and double line layout in flex mobile layout

Here is a single line layout, use UL > Li to layout <ul class=”local-nav”>         <li>             <a href=”#”>                 < span class = “local NAV icon 1″ > < / span > scenic spots             </a>         </li>         <li>             <a href=”#”>                 < span class = “local-nav-icon-icon2″ > < / span > tickets for fun             </a>         </li>         <li>             <a href=”#”>                 < span class = […]