Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

deleting duplicate files

Featured Replies

I have a file with many many records, all of which have at least one duplicate. I want to be able to find all the unique records and then delete the duplicates. Is there a quick and dirty way to do this?

Susan

Hi Susan,

You probably already know that you can use the ! Find operator to find duplicates in a field.

Then you can sort your found set by the values in that same field -- thus lining up all the duplicates.

Then you can use a script that loops through the found set, omitting the first instance of each value, but leaving the duplicates. After the loop gets to the bottom of the list, you can delete the remaining found set.

For a quick reference on using omit in a looping scripts, check out this thread:

http://www.fmforums.com/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=15&t=000821

Hopefully this is enough to get you started. Good luck!

As I read it, Andrew's solution works if there is only one duplicate for any record. ere is a sample of a script I use to delete duplicates where there is/maybe more than one duplicate.

Enter Browse Mode

Perform Find [ Request 1: master field ! ]

[ Restore find requests ]

Sort [ Sort Order: master field (Ascending) ]

[ Restore sort order, No dialog ]

Go to Record/Request/Page

[ First ]

Set Field [ g_duplicates, master field ]

Omit Record

Loop

If [ master field = g_duplicates ]

Delete Record/Request

[ No dialog ]

Else

Set Field [ g_duplicates, master field ]

Omit Record

End If

Exit Loop If [ Status( CurrentFoundCount) = 0 ]

End Loop

Set Field [ g_duplicates, "" ]

Show All Records

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.