Answer the question
In order to leave comments, you need to log in
How to run this command with bat?
There are multiple files
gd-5.txt
Wddss-5.txt
Hf-66sa-7.txt
...
Answer the question
In order to leave comments, you need to log in
This is how it will be done:
for /f "tokens=* delims= " %%i in ('dir /b "*.txt"') do Set LIST=%%i& set LIST | ren "%%~fi" "%LIST:-=%"
SetLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%i in ('dir /b "*.txt"') do (Set LIST=%%i & ren "%%~fi" "!LIST:-=!")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question