Jump to content

Recommended Posts

  • 4 months later...
  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

I am using the MD5 DLL to write a program that finds duplicate files. However, in several instances the function returns 0 for the hash, although the file sent actually exists. The majority work fine, but because of this files with "0" hashes are found similar while in reality there are not. Some file names had french characters in their name. I wonder if there is a way to debug this. I am also not sure what the "true" and "1" mean in this call from my program

MD5Hash($Files[$i], 1, True)

Example file name that returns 0 for hash

My Music\divers artistes\20 Ans Nostalgie Française Disc 1\03 L'été indien.mp3

Thanks

  • 5 months later...
Posted (edited)

where is MD5Hash function?

After I run the md5 sample I get :

How can I use this to get md5 of a file? I want to make a check sum of my file.

: ==> Unknown function name.:
MsgBox(0, "Test MD5Hash.DLL", "String 'Test String':" & @TAB & MD5Hash("Test String",
MsgBox(0, "Test MD5Hash.DLL", "String 'Test String':" & @TAB & ^ ERROR

Edit: Ok I dont know what is the sample problem, it wont work, but this sample works fine: the speed is kind of slow tho:( it took 30 sec to checksum 1500 files total size 500 MB

But this seems to be the only UDF that actually works so I say Thank you!

$begin = TimerInit()

#compiler_plugin_funcs = MD5Hash

Dim $FileMD5
$MD5Plugin  = PluginOpen(@ScriptDir & "\MD5Hash.dll")   

;~ ------------------------------------------------------
    $path   = 'D:\temp\F1\Sumacher\'
    $search = FileFindFirstFile($path & "*.*")  

    ; Check if the search was successful
    If $search = -1 Then
        MsgBox(0, "Error", "No files/directories matched the search pattern")
        Exit
    EndIf
    While 1
        $file = FileFindNextFile($search) 
        If @error Then ExitLoop

        
        $FileMD5    = MD5Hash($path & $file,1,True)

        $dif = TimerDiff($begin)        
        ConsoleWrite($file & ' ' & $FileMD5 & ' ' & $dif/1000 & @CRLF)  

    WEnd

;~ ------------------------------------------------------

FileClose($search)
PluginClose($MD5Plugin)

$dif = TimerDiff($begin)

ConsoleWrite($dif/1000 & @CRLF)
Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
  • 3 years later...
  • Moderators
Posted

Nuttapong,

In future, please do not necro-post just to say thanks. Asking a valid question about the code is fine, but merely padding the thread is not. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

@Melba

He just say thanks !

if you repress newcomers when they say thank you, what will you say when they ask something stupid ?

Please do not scare polite newbies, they are now so rares... ;)

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

  • Moderators
Posted

wakillon,

I stand by my original post - necroing a 3 1/2-year old thread just to say thanks is not something to be encouraged. And if the poster is scared away by that very mild comment complete with "smiley", I have grave fears for their survival in the real world let alone the internet. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • 1 month later...
  • 1 month later...
Posted (edited)

I am having the same issue as Goldenix. What am I doing wrong?

  Quote

: ==> Unknown function name.:

MsgBox(0, "Test MD5Hash.DLL", "String 'Test String':" & @TAB & MD5Hash("Test String",

MsgBox(0, "Test MD5Hash.DLL", "String 'Test String':" & @TAB & ^ ERROR

Edited by jtrout

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...