View previous topic :: View next topic |
Author |
Message |
snarl
Joined: 24 Jun 2007 Posts: 2
|
Posted: Sun Jun 24, 2007 8:30 am Post subject: Renaming large numbers of Outlook msg files |
|
|
Hi,
I'm having problems renaming a large number of these Outlook msg files.
Essentially, I'm using Msgsave to extract outlook files for archiving purposes, and these are saved with a file format:
20070105--[Time]-[Sender]-[Unique File Ref]-[Subject].msg
The first eight digits are actually the date in eight digit, YYYYMMDD format. I'd like to change the file name to the below (the unique file reference is actually the subdirectory that the files will be stored under):
070105 [Unique File Ref]-[Sender].msg
Unfortunately, I'm not familiar with programming and haven't been able to get this using the standard commands. Any help will be greatly appreciated! Thanks!
Gerald |
|
Back to top |
|
|
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Sun Jun 24, 2007 3:17 pm Post subject: |
|
|
Set the name filter to '*.msg' (assuming a wildcard format)
Set up the search/replace columns of the custom renaming list as follows (do not include the single quotes):
Row: 1
Search: '(?x)^.{1,2} # remove 1st 2 chars'
Replace:
Row: 2
Search: '(.*?)--(.*?)-(.*?)-(.*?)-(.*?).msg'
Replace: '\1 \4-\3.msg'
This is a good example of how to use a regular expression to rearrange different groups of words in a name.
I wasn't cure if you were also asking to have the files moved into a subfolder named for the [unique file ref]. If so, then please give a specific example of a name and the resulting 'path + newname' and I'll show you how PFrank can do that too.
Hope this helps,
Peter. |
|
Back to top |
|
|
snarl
Joined: 24 Jun 2007 Posts: 2
|
Posted: Mon Jun 25, 2007 1:35 am Post subject: |
|
|
Thanks loads!
The last time I touched anything resembling programming was dBase more than 15 years ago - I'm just far too rusty!
That did everything I required - I'll take a look at the Regex, and try to puzzle out the intricacies. Again, thanks!
Gerald |
|
Back to top |
|
|
|