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.
"dir /b" piped into a perl script which parses the file names and renames. It most probably can be even be made into a one line which can entirely be run from the command line.
Depends on my level of laziness. You can dump the filenames to a text file with a dir /b >ren.bat then use a real text editor like notepad++ and add the rename to the start of every line and the new name to the end of every line. your filename is already a batch file from step 1
or you can master the intricacies of the for command mixed in with some grep goodness and spend an hour debugging a batch file, and completely forget how the for command works by the next day.
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:
"Jim Thompson" wrote in message news: snipped-for-privacy@4ax.com...
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!
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.