Solved How to truncate the start of all file names in a folder

May 22, 2016 at 18:54:27
Specs: Windows 7
How can I truncate the START of all file names in a folder by a specified number of characters?
e.g. Remove the first 5 characters of filename from 12345ABC.txt to change it to ABC.txt, and do the same for other files in the folder (23456BCD.txt to BCD.txt, 34567CDE.txt to CDE.txt etc.)

See More: How to truncate the start of all file names in a folder

Report •


#1
May 22, 2016 at 19:49:31
Have used FileRemaner :
http://www.sherrodcomputers.com/pro...

The free version has it limitations but worth a try.
Use the "Preview" to check the outcome of the changes before you "Apply"


Report •

#2
May 22, 2016 at 20:13:30
Thanks for this but I am not allowed to download third-party software to my work PC.
Is there a batch file process I could use?

Report •

#3
May 23, 2016 at 03:58:47
✔ Best Answer
@echo off & setlocal EnableDelayedExpansion
cd YOUR FOLDER
for /F "delims=" %%i in ('dir /B /A-D') do (
  set _name=%%i
  ren "%%i" "!_name:~5!
)

message edited by IVO


Report •
Related Solutions


Ask Question