How to batch rename files with the extension "*.rar.重命名" to "*.rar" using batch processing?
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
| Rater | Score | Time |
|---|---|---|
| JamesYou | +2 | 2008-11-05 19:25 |
| Rater | Score | Time |
|---|---|---|
| HAT | +2 | 2008-11-05 19:47 |
Originally posted by JamesYou at 2008-11-5 19:15:
LS, isn't copy the copy command?
Originally posted by yishanju at 2008-11-5 07:36 PM:
You can also use this command to rename.
@ECHO OFF
color 0A
setlocal ENABLEDELAYEDEXPANSION
title Batch rename image (jpg) filenames in current directory!
echo.
echo.
echo ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo Batch rename image (jpg) filenames in current directory!
echo ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo.
set fhz=jpg
SET NO=0
set namet=
SET /P namet=Please choose and enter the filename prefix:
FOR /F %%i IN ('dir /b *.%fhz%') DO (
SET /A NO+=1
REN %%i %namet%!NO!.%fhz%
)
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo Filename renaming completed.....Press any key to exit
echo ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
pause>nul