Re: Changing file names 'in bulk'
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Sat, 26 Jan 2008 22:19:30 +0100
"Keith H" <kt.holmes@xxxxxxxxxxxx> wrote in message
news:U2Mmj.48262$ov2.11414@xxxxxxxxxxxxxxxxxxxxxxx
I have several hundred files with titles beginning with a reference number.
I want to move each reference number to the end of the title.
Eg: I want "MP031 Amazing Grace.ppt"
to become "Amazing Grace MP031.ppt"
and so on for each of the others, too
Any ideas for a 'batch process'?
This sort of thing is usually handled by "Superb Batch Renamer"
(http://www.1-4a.com/rename/). However, in your case I was
unable to fine a way to get it to do what you want - perhaps
you can find a way yourself. If not then try this batch file:
@echo off
set Source=d:\My Data
pushd "%Source%"
dir /a-d /b > "%temp%\dir.txt"
for /F "tokens=1*" %%a in ('type "%temp%\dir.txt"') do echo ren "%%a %%b"
"%%~nb %%a%%~xb"
popd
Note that the last line is a long line. It starts with "for" and ends with
"~xb"". To activate the batch file you must remove the word "echo"
from the last line.
.
- References:
- Changing file names 'in bulk'
- From: Keith H
- Changing file names 'in bulk'
- Prev by Date: Changing file names 'in bulk'
- Next by Date: Re: Problem with Windows file share and Mac.
- Previous by thread: Changing file names 'in bulk'
- Next by thread: Re: Problem with Windows file share and Mac.
- Index(es):
Relevant Pages
|