OPEN file1$ FOR BINARY AS #1that works up until audio and video files which can be 98% matches but different file sizes and be the exact same video or audio. if someone just trimmed a few seconds off.(side effect of downloading playlists) there might be a few different byte in the beginning or the end from the trim but the bulk is exactly the same. thats why i tried setting a$ to 256,1024 or even lof(#)/100. but it turned out slower than reading long int for long int on files 150MB and up. at the moment I skip anything bigger than 50MB cause compare times can exceed 1200 seconds a cycle. it stores them but just flags them as same file name.
OPEN file2$ FOR BINARY AS #2
t1$ = SPACE$(LOF(1))
t2$ = SPACE$(LOF(2))
GET #1, 1, t1$
GET #2, 1, t2$
IF t1$ = t2$ THEN It's an EXACT duplicate ELSE It's not...
For long files, I'd simply compare LOF(1) and LOF(2) for a pretest. If they're not a match then there's no reason to compare the contents.
that works up until audio and video files which can be 98% matches but different file sizes and be the exact same video or audio. if someone just trimmed a few seconds off.(side effect of downloading playlists) there might be a few different byte in the beginning or the end from the trim but the bulk is exactly the same.