FileSystem.FindFileBySizeAndHash
Method | FindFileBySizeAndHash |
---|---|
Module | FileSystem |
Library | Core |
Action | Finds a file by its size and hash. |
Parameters |
This must match the NoteOn Windows, excluded paths can contain drive letters on Windows (e.g. C:\\), to skip scanning whole volumes. Ensure the exclude paths are complete paths starting from root. |
Return values | For each file found:
|
Example | This will perform a fast search, looking for a file with the specified SHA-256 hash and size: FileSystem.FindFileBySizeAndHash(Size:402, Hash:"8eda0d394c2370c4ac8562d5ae6b5e7b01f347940bc58a65ca873c33a33475a3"); This will perform a slow search, looking for a file with the specified MD5 hash and size: FileSystem.FindFileBySizeAndHash(Size:999, Hash:"08ad2e5d7538091fbbfd352bb323e238", Fast:false, Algorithm:"MD5"); @exclude = SELECT column1 AS Path FROM ( VALUES ("C:\\"), ("E:\\IgnoredFolder") ); FileSystem.FindFileBySizeAndHash(Size:402, Hash:"8eda0d394c2370c4ac8562d5ae6b5e7b01f347940bc58a65ca873c33a33475a3",Exclude:@exclude); |
Platforms |
|
Notes | This will search all fixed disks which is an expensive process and may take some time. Currently files locked by some other process cannot be hashed and therefore cannot be reported as being found. This is not supported. This will not search for files on remote machines. This works slightly differently on Windows and Non-Windows platforms when the given file or directory where the file resides does not have any permissions assigned/available. Windows platforms do not report such locked-down files whereas non-Windows do report the files irrespective of which level permission has been denied (file or directory). This happens because the 1E.Client daemon runs as "root" (superuser). |