Maker Pro
Maker Pro

Multiple File Renaming

J

Jim Thompson

Jan 1, 1970
0
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

Offend a leftist weenie... Support Whole Foods!
 
P

PeterD

Jan 1, 1970
0
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

...Jim Thompson

When I'm faced with a task like this, I create a batch file to do the
work. Word's ability to work with columns (create a table, paste,
edit, then export the text or simply remove the table attribute) makes
the task a set of global find and replace.

Other better word processors should be able to do the same kind of
tricks.
 
S

spamme0

Jan 1, 1970
0
Jim said:
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

...Jim Thompson
TotalCommander has a multi-file renaming tool.
It's not automatic, but relatively painless.
Replace _2009 with nothing
Replace tmt with tmt_2009
 
J

John KD5YI

Jan 1, 1970
0
To-Email-Use- said:
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

...Jim Thompson

I had similar needs so I got this...

http://www.bulkrenameutility.co.uk/Main_Intro.php

Cheers,
John
 
J

Jamie

Jan 1, 1970
0
Jim said:
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

...Jim Thompson
Batch File (BAT)
Visual Basic Script file etc..
And I think Java can also do that.

If you can fine some one nice enough to write one for you.

If it really becomes a problem for you , I could whip up a simple
conversion app for you.

I can only assume that you must have a lot of them ?
 
M

Martin Riddle

Jan 1, 1970
0
Jim Thompson said:
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

...Jim Thompson

Is that the exact File name? Then a VB script should do.
Batch files are a little more complicated.

Cheers
 
F

FatBytestard

Jan 1, 1970
0
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

...Jim Thompson

You could hand write a batch file to do it.

You could write some VB in an excel spreadsheet (or anywhere else VB is
used)that would do a for/if/then routine on them.
 
F

FatBytestard

Jan 1, 1970
0
Stuff like this is why I keep a Tcl interpreter around; although
with a total of eight files, it's more trouble that it is worth.


Lazy fucks like you are more trouble than you are worth. That remark
proves it.
 
J

Jon Kirwan

Jan 1, 1970
0
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

As with anyone else who doesn't pander or otherwise suck up to your
political philosophies, what I write probably won't be seen by you.
But here it is, anyway. (I'm an equal-opportunity poster.)

Unix makes this darned easy. Has for quite some time. Something like
this:

rename -n "s!eStmt_(.*)_(.*)_(.*)\.pdf$!eStmt_$3_$1_$2\.pdf!"

If Perl is separately installed (and it is readily available under
Windows), that can be used as part of a very short program as well.

Or, if you aren't used to DOS (you must be, but perhaps you have moved
away from it), then this Windows program is free:

http://www.bulkrenameutility.co.uk/Main_Intro.php

I suspect it will do fine. It supports Perl expressions. Screen is
busy-looking.

Jon
 
M

Martin Riddle

Jan 1, 1970
0
Jim Thompson said:
Them be the exact filenames... my bank statements. I've suggested
they change their e-Statement naming convention ;-)

...Jim Thompson

Try the following batch file. Place it in the same directory as the
eStmt files.
You can run it from the command line:
cd c:\estmt
rname

Or click on it in explorer in the estmt directory

It'll create a new directory "renamed' with all the files copied and
renamed in that directory.

Cheers


Cut here ___________________________

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION

rem name format - eStmt_03_23_2009.pdf
rem new format - eStmt_2009_03_23.pdf

Rem create dir for new files
if exist renamed goto cont

md renamed

:cont

for %%A in (*.pdf) do (

echo %%A
Rem Parse date out of file name
for /f "tokens=1-5 delims=_." %%a in ("%%A") do (
set prefix=%%a
set month=%%b
set day=%%c
set year=%%d
set ext=%%e

)

Rem Create Newname
set newname=!prefix!_!year!_!month!_!day!.!ext!
copy %%A "renamed/!newname!"
echo File: %%A renamed to: !newName!

)
 
C

ChairmanOfTheBored

Jan 1, 1970
0
Them be the exact filenames... my bank statements. I've suggested
they change their e-Statement naming convention ;-)

...Jim Thompson

That is even easier. When you DL the PDF, you can ALWAYS give it ANY
name at the moment the save dialog is up.

So one time, each month, YOU save as whatever name you want.

If you get it in an email, the RIGHT click on the attachment, and do
the save as.
 
Q

qrk

Jan 1, 1970
0
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

...Jim Thompson
Write a batch file.
All the following is command line stuff.

1. Do a directory listing. dir /b *.pdf > zit.bat
This will put the bare contents of a directory listing into a file
called zit.bat.

2. Open zit.bat in your favorite text editor. The one you use should
have column select which allows you to move and copy the columns. A
little search and replace of "eS" to "ren eS" will put in the rename
command. Column copy the original file name column then do column
moves for the new file name. You'll want the final result to look like
this for each line.
ren eStmt_01_22_2009.pdf eStmt_2009_01_22.pdf

3. Save your file and run the zit.bat.

If you want, you can email zit.bat from step 1. I can easily fill in
and do the manipulation in a couple minutes.
 
Q

qrk

Jan 1, 1970
0
Thanks, Mark! There are only 20 files right now, and I was just being
lazy; but I don't want to waste anyone's time... I thought there might
be something in Windows I was overlooking ;-)

...Jim Thompson

Unfortunately, Windows command line is pretty weak compared to Unix.
Ultra Edit should be able to do column manipulations pretty easily.
 
J

Joerg

Jan 1, 1970
0
Jim said:
I have a set if files...

eStmt_01_22_2009.pdf
eStmt_02_19_2009.pdf
eStmt_03_23_2009.pdf
|
|
eStmt_08_21_2009.pdf

Any nice automated way to rename them as...

eStmt_2009_01_22.pdf
eStmt_2009_02_19.pdf
eStmt_2009_03_23.pdf
|
|
eStmt_2009_08_21.pdf

Windows Explorer bulk renaming will only use a common name and append
a number order :-(

Hey, migrating to the ISO date format for invoices and stuff? I did that
three months ago.
 
Q

qrk

Jan 1, 1970
0
That was so easy I guess it's time I applied that nice and simple
technique to my thousands of photos ;-)

...Jim Thompson

For renaming photos, I use jhead (command line program) which uses the
date and time info in the EXIF header for the photo name. XnView
(thumbnail viewer program) also has this feature if you don't like
command line. I would guess that IrfanView has this function.
 
C

ChairmanOfTheBored

Jan 1, 1970
0
Hey, migrating to the ISO date format for invoices and stuff? I did that
three months ago.


NO! READ the thread, dingledorf. He is trying to get a bank to
switch. *HE* still has to do it manually since they have not done so
yet.
 
M

Martin Riddle

Jan 1, 1970
0
JosephKK said:
For a single directory, containing only original format file names to
preferred style filenames that could be really great. If you did that
to a directory of both style file names disaster could result,
especially if applied repeatedly.

Yes, that true. That’s why I copied the file and renamed it to another
directory. So things cant get muffed up.
The batch file assumes all the PDF files have the same name format.

Cheers
 
Top