SAVE FIRST ITEMS IN () CUT SECOND ITEMS IN ()

Post any Bulk Rename Utility support requirements here. Open to all registered users.

SAVE FIRST ITEMS IN () CUT SECOND ITEMS IN ()

Postby wfremer » Fri Mar 13, 2015 2:14 am

I am a beginner and do not understand programming at all. I tried to do my computer backups with File History which is built into my Windows 8.1 program on my computer. This turned out to be a big mistake. When I reformatted my hardrive and backups File History added a UTC Timestamp to "ALL" of my files and in many cases it also "DUPLICATED" MANY FILES" in particular my jpeg. files. After reviewing my options this Utility seems to be my best answer for returning my computer to normal (all copies of my backups have the same problems).
My problem: Some of my files have either a (1) (2) or (3) in parenthesies, followed by a UTC timestamp that is also in parenthesies. I have tried using the #5 Cut feature with a Special (*) which works on all files that do not list 1,2,or 3 in parenthesies before the timestamp. In these cases the utility deletes the (1),(2), or (3) and then does not touch the second set of () that has the timestamp in it. Below are a couple of examples:
DSCN0002 (1) (2014_07_06 00_58-30 UTC).jpg
DSCN0002 (2014_10_15_17_30_41 UTC).jpg
DSCN0002.jpg
DSCNOOO3 (2014_10_15_17_30_41 UTC).jpg
DSCNOOO3 (3) (2014_07_06 00_58_30 UTC).jpg
DSCN0003.jpg
DSCN0005 (2) (2014_10_15_17_30_41 UTC).jpg
DSCN0006 (2014_10_15_17_30_41 UTC).jpg

In addition to this problem I also end up with "Many" duplicates. Is there some way to search my pc database for duplicates with this utility so I can delete only the 100% duplicates?

So far this utility seems to be my best answer. I am very impressed with what it does, I just don't understand how to use it.
These UTC timestamps have created a big problem throughout my very large database.
Thanks in advance for any help that you can give me. If you have any questions you can contact me directly.
wfremer
 
Posts: 3
Joined: Wed Mar 11, 2015 9:40 pm

Re: SAVE FIRST ITEMS IN () CUT SECOND ITEMS IN ()

Postby bitmonger » Thu Apr 02, 2015 12:47 am

Just to be clear, all the correct original filenames are of the form DSCNxxxx.jpg? And you want to get rid of the suffix added later?
Then, a file currently called DSCN0002 (1) (2014_07_06 00_58-30 UTC).jpg and another called DSCN0002 (2014_10_15_17_30_41 UTC).jpg, if corrected would both have the same name DSCN0002.jpg. This will create a collision if performed because you can't have multiple files in the same directory with the same name. To get rid of the multiple files you might try SearchMyFiles by Nirsoft or Duplicate Cleaner Free by Digital Volcano. Both are free. You can get an overview of these and others at techsupportalert.com.
Once you get rid of the duplicates, you can easily get rid of the suffixes.

Here is one way, assuming filenames are of the form DSCNxxxx.jpg, :

In the RegEx (1) area of Bulk Rename
Match ^(\w\w\w\w\d\d\d\d).*
Matches any filename starting with an 8 letter/number combination, and captures this 8 letter combo.
Note that if the last 4 digits of this aren't numbers, it won't match and the search string would have to be altered.

Replace \1

This will get rid of the trailing suffix.

Hope this helps,
Bit
bitmonger
 
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am

Re: SAVE FIRST ITEMS IN () CUT SECOND ITEMS IN ()

Postby wfremer » Mon Apr 13, 2015 7:34 pm

Dear Bitmonger,

Your solution works great for my picture files that start with 8 digits but it does not solve my complete problem.

1. When I have a file that has another set of parenthesis like this (3) they are erased along with the trailing UTC stamp that is also in parenthesis near the back end of the file name.

2. I think the complete problem can be solved by figuring out a way to delete only the UTC stamp that has been added Near the "Back End" of ALL OF MY FILES in my COMPLETE DATABASE but not on all files. THE UTC STAMP ALWAYS HAS 14 NUMBERS, 4 UNDERLINE MARKS, AND THE LETTERS UTC INSIDE OF PARENTHESIS. This is an Example of a typical stamp: (2014_07_06 00_58_30 UTC). Some of the numbers inside the parenthesis change but other than that the amount of numbers,underline marks, and letters stay the same. This way the first set of Parenthesis would not be effected. The only thing that needs to disappear is the complete UTC STAMP with its parenthesis. The Utc stamp is not always the last thing in the file name, in some cases there are other things after the UTC stamp. My picture files were only a small part of my problem. My complete database has these extra timestamps added in their names.

If we can locate and delete or cut all of these UTC stamps with their parenthesis from my complete database we can solve the problem.

Thanks for all your help
wfremer
 
Posts: 3
Joined: Wed Mar 11, 2015 9:40 pm

Re: SAVE FIRST ITEMS IN () CUT SECOND ITEMS IN ()

Postby bitmonger » Mon Apr 13, 2015 10:35 pm

Ok, I may have misunderstood what you wanted. I thought you wanted all except the first part removed. If you only want to get rid of the UTC portion, and, when present, it is always at the end of the filename, try the following:

Match
(.+)\([^(]+UTC\)

Replace:
\1

Works for me
Bit
bitmonger
 
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am

Re: SAVE FIRST ITEMS IN () CUT SECOND ITEMS IN ()

Postby wfremer » Wed Apr 15, 2015 11:01 pm

Dear Bitmonger,

Its great,your solution seems to work fine.

I have a couple of questions. I want to use your solution on my complete Local (C:) Drive so it checks all of my files. I think that if I put a check mark for "Hidden & Sub Folders" in the
SOLUTIONS #12 BOX it should check everything on my computer and eliminate all of the UTC stamps. Do you agree or is there something more that I must do?

I now am working with Carbonite for my backups and they have a backup drive on my computer which has a copy of my database on it and another copy on their mainframe. Any file changes that I make on my computer will be backed up as revised to these databases within 30 days. I am planning on calling Carbonite before I try to make this major change to make sure I am not going to cause them any problems.

Thanks again for all your help.

Bill
wfremer
 
Posts: 3
Joined: Wed Mar 11, 2015 9:40 pm


Return to BRU Support