Grandfather your duplicate file names


Let’s take another letter from our letter bag:

Dear Engineering Data Specialist Man,
I have been using PDMWorks Enterprise for a while now and have just found the option to not allow duplicate file names, but unfortunately I know there are hundreds of files already in the vault that have duplicate file names -especially from the legacy data I imported when I first started using PDMWorks Enterprise. Is it too late for me to turn this option on? Do I have to go through my entire vault looking for duplicate file names first? Please help quickly, I even lost a tennis match recently because of my concern! -- Ana I.

Thanks for the question. You are most wise to see the value of this option. Duplicate file names for some file types may be okay, but it is a terrible way of life if you have duplicate SOLIDWORKS file names. You’re luck. PDMWorks Enterprise only does the duplicate file name check when a file is leaving the private state. Thus if you have a file that has a duplicated file name already in the vault, you may continue to check in/out the file as normal. You can even create a file with a duplicate file name, you simply cannot check the file in for the first time!

P.S. Try not to roll your wrist so much on your backhand, you’ll get a lot more control.

3 comments on “Grandfather your duplicate file names

  1. Hi Jeff,
    Its also possible to run a SQL query to return a list of duplicate files in your vault. Handy if you want to weed out the pesky things after disallowing duplicates in your vault.

    Just replace FileVaultDbName with your vault database name. The query wont change any of your data, but as with all operations on the PDMWE SQL database, back it up first.

    Hope this helps,

    Adrian Connard

    USE [FileVaultDbName]
    SELECT D.documentid, D.filename AS ‘File Name’, P.Path AS ‘Project Path’
    FROM Documents D
    INNER JOIN DocumentsInProjects DIP
    ON D.DocumentID = DIP.DocumentID
    FULL OUTER JOIN Projects P
    ON DIP.ProjectID = P.ProjectID WHERE D.Filename IN (SELECT Filename FROM Documents where Deleted = 0 GROUP BY Filename HAVING (COUNT(Filename) > 1)) ORDER BY D.Filename

  2. Thanks Adrian for the sample sql statement. Couple changes to the code and I was up and running!

Comments are closed.