Trimming file name in folder
Posted on 2008-10-21
I have 51 files with a format of [database name][backupdate]. For example DBSpuen20081021.bak
I want to do a trim of the date so the file is DBSpuen.bak
Now the kicker....98% of the file name length is 7 but two other database names are 6 and 9 characters respectively.
How can I use the LEN command so it accidentally trim any part of the database name? (The db names are all alpha characters)