renaming false positive duplicates

English support for the software AllDup
Post Reply
MrNeilen
Posts: 5
Joined: 02 May 2020, 12:54

renaming false positive duplicates

Post by MrNeilen »

Its time to do a bit of spring hard-drive cleaning, but I am having a very difficult time due to AllDup finding false positive duplicate filenames. I know that these findings are false simply by looking at the name of the folder. This name represents the name of the project, and the multiple files inside the project are saved with using variable flags. This method, if used properly, is to save the user time from manually configuring each file that gets packaged along with the current project. Prior to using Alldup, I did not know that Mudbox uses this method instead of packaging everything into one file. So now I am basically stuck with these false positive duplicates, but I can still resolve the problem if it is possible for AllDup to rename each file by adding the project folder name as a prefix to the original file. For example...
if the project name was called "Bowl of fruits", instead of having
root document folder\Bowl of fruits\Bowl of fruits V1\Default_Material_BaseColor.tif
root document folder\Bowl of fruits\Bowl of fruits V1\Default_Material_Rooughness.tif
root document folder\Bowl of fruits\Bowl of fruits V1\Default_Material_Metallic.tif
and..
root document folder\Bowl of fruits\Bowl of fruits V2\Default_material_BaseColor.tif
root document folder\Bowl of fruits\Bowl of fruits V2\Default_Material_Rooughness.tif
root document folder\Bowl of fruits\Bowl of fruits V2\Default_Material_Metallic.tif

I want to rename these files to....
root document folder\Bowl of fruits\Bowl of fruits V1\Bowl of fruits V1_BaseColor.tif
root document folder\Bowl of fruits\Bowl of fruits V1\Bowl of fruits V1_Roughness.tif
root document folder\Bowl of fruits\Bowl of fruits V1\Bowl of fruits V1_Metallic.tif
and..
root document folder\Bowl of fruits\Bowl of fruits V2\Bowl of fruits V2_BaseColor.tif
root document folder\Bowl of fruits\Bowl of fruits V2\Bowl of fruits V2_Roughness.tif
root document folder\Bowl of fruits\Bowl of fruits V2\Bowl of fruits V2_Metallic.tif
I highlighted the last folder in red to show that I want to use the name of the last folder to the filename. I thought since AllDup uses %1 and %2 as filename and file extension, maybe there is a percent variable for folders, such as %0
therube
Posts: 322
Joined: 07 Nov 2012, 00:28

Re: renaming false positive duplicates

Post by therube »

AllDup uses %1 and %2 as filename and file extension
How/where do you do that?


(I'd think what you're wanting would be better handled with a file renaming tool.
There are renamers out there that can pick up on a parent directories name.
Though to extract parts of that name would likely take multiple steps.
Like append the parent directory name, then come back & use some regex to whittle the appended part down to just the part you're looking for.

Bulk Rename Utility and [I'm pretty sure] Advanced Renamer can both pick up on parent directory names.)
MrNeilen
Posts: 5
Joined: 02 May 2020, 12:54

Re: renaming false positive duplicates

Post by MrNeilen »

@->therube
How/where do you do that?
After you selected your files, there are 3 delete methods under "What action is to be performed?" The last option, where it says "Rename files," tick that option. This will give a textbox to type in a path. By default, in the textbox field, it should already have an example set for you. This example uses the #, %1, and %2. These 3 are explained in the help document. However, I did not see an option for folder, and I thought it would not hurt to ask.
(I'd think what you're wanting would be better handled with a file renaming tool.
There are renamers out there that can pick up on a parent directories name.
Though to extract parts of that name would likely take multiple steps.
Like append the parent directory name, then come back & use some regex to whittle the appended part down to just the part you're looking for.
This sounds interesting. Do any of these rename tools also offer to find duplicate files?
Administrator
Site Admin
Posts: 4047
Joined: 04 Oct 2004, 18:38
Location: Thailand
Contact:

Re: renaming false positive duplicates

Post by Administrator »

MrNeilen wrote: 03 May 2020, 03:55 root document folder\Bowl of fruits\Bowl of fruits V1\Default_Material_BaseColor.tif
rename to:
root document folder\Bowl of fruits\Bowl of fruits V1\Bowl of fruits V1_BaseColor.tif
Let's say we add a new placeholder %0 that contains the last folder name of the file path.

How do you want to replace the part "Default_Material" with the content of the new placeholder? Thats impossible...
MrNeilen
Posts: 5
Joined: 02 May 2020, 12:54

Re: renaming false positive duplicates

Post by MrNeilen »

Administrator wrote: 04 May 2020, 13:43
MrNeilen wrote: 03 May 2020, 03:55 root document folder\Bowl of fruits\Bowl of fruits V1\Default_Material_BaseColor.tif
rename to:
root document folder\Bowl of fruits\Bowl of fruits V1\Bowl of fruits V1_BaseColor.tif
Let's say we add a new placeholder %0 that contains the last folder name of the file path.

How do you want to replace the part "Default_Material" with the content of the new placeholder? Thats impossible...
When you set byte for byte content comparison to a low value like 10%, you can select duplicates by content percentage. Setting this value to something like 95% will give you a range of files between 10%-95%. Then it is obvious to see that something is 25% or less must be a naming coincidence. Maybe the program uses a file version style that increments the folder name instead of the filename, which has recently happened to me. Every time the software saves all of the files that are specific to the project folder will be saved with a new folder version. For example, if the project's name is Corvette, the project folder by default will be named Corvette and any updating to the files being saved will then get a new folder version name. So my subfolder for this example, would be

x:\documents\name of application\Corvette\Corvette Files\….
x:\documents\name of application\Corvette\Corvette Files 01\….
x:\documents\name of application\Corvette\Corvette Files 02\….

and if there is a way to retrieve the previous folder name, I could use that as a prefix, such as

..\\Corvette Files 02\Corvette files 02_file 1
..\\Corvette Files 02\Corvette files 02_file 2
..\\Corvette Files 02\Corvette files 02_file 3

and the next version would move on to...

..\\Corvette Files 03\Corvette files 03_file 1
..\\Corvette Files 03\Corvette files 03_file 2
..\\Corvette Files 03\Corvette files 03_file 3


So, unless you mean its impossible with AllDup, I am not quite understanding why you think this is impossible. AAMOF, therube proved that it would be better to use a file renaming utility instead.

@therube I will mark your post as the answer. The Bulk Rename Utility not only performs renaming files, it also has a file collision rule such as preventing duplicate names.

Thank you for your help.
Post Reply