Jump to content
Sign in to follow this  

duplicated line ?

Recommended Posts



I'm have a file that containes around 45 lines , some are exactly the same . example :

line 1 087733445

line 2 A55224689

line 3 087733445

line 4 F44522652

what i am triyng to do is check if a certain line exists 2 or more times in this file.

i think it can be done be filereadline and then puting that line in an array, but i am still confused and don't know how to do this .

can somebody help me plz ??

Share this post

Link to post
Share on other sites

Should work fine for smaller files:

Dim $InputRecords
For $x = 1 to $InputRecords[0]
    For $y = 1 to $x-1
        If $InputRecords[$x] = $InputRecords[$y] Then
            ConsoleWrite("Record " & $x & " is a duplicate of record " & $y & @LF)

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.