Answer the question
In order to leave comments, you need to log in
How to remove the first 4 characters in a filename on Windows?
In Linux, you can do this without any problems
using the command . But how to do it in Windows? rename 's/^.....//' files*
Answer the question
In order to leave comments, you need to log in
I asked myself, I found it.
@echo off
setlocal
set "folder=C:\ftp\rpo"
set "number=7"
pushd "%folder%"
for /f "delims=" %%i in ('2^>nul dir/ad/b' ) do (
set name=%%~ni
2>nul cmd/v/c ren "%%i" "!name:~%number%!%%~xi"
)
popd
endloca
might come in handy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question