Grandfather your duplicate file names

June 30th, 2008 by

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.

Jeff Sweeney

CSWE Engineering Data Specialist 3DVision Technologies

3 Responses to “Grandfather your duplicate file names”

  1. Adrian Connard says:

    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

    —————————————————————————————-FindDuplicate.SQL
    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. Jeff Sweeney says:

    Oh! Very handy tip -this will be helpful to many. [Wish I would have thought of it.] Thanks Adrian!

  3. Lucas Dexter says:

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

Leave a Reply


five − = two

Follow
Get every new post delivered to your inbox
Join other followers
Powered By WPFruits.com
Bear