Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I want to change the filename by moving the first part of the filename to the end of the filename in a batch.
example:
20090101 - xxxxx - aaaaa.pdf
to
xxxxxxx - aaaaaa - 20090101.pdfdoes anyone know a solution for this?

Post this in the Programming Forum... linkon the right of this page.
Home Page http://ewen.uuuq.com/

This is hardwired to work on PDF files.
==================================
@echo off & setLocal EnableDELAYedExpansionfor /f "tokens=* delims= " %%a in ('dir/b/a-d *.pdf') do (
for /f "tokens=1-3 delims=- " %%i in ("%%~Na") do (
ren "%%a" "%%j - %%k - %%i%%~Xa"
)
)
=====================================
Helping others achieve escape felicityM2

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |