how to find Invalid files headers

62 views
Skip to first unread message

Abdur Rahim Sopon

unread,
Jul 14, 2024, 9:06:59 AM (10 days ago) Jul 14
to DataRecoveryCertification
Hello 
is it possible to find Invalid file headers software?
I have a raw doc recovery case and I found around 17,000 files.
Now I need to remove  Invalid files. 

case History it's a flash Recovery case I dump with a flash extractor.
FE can't access FS so I made an image and ran raw recovery. 


Thank you 
2024-07-14_185459.jpg

pbzcbf...@gmail.com

unread,
Jul 14, 2024, 11:28:15 AM (10 days ago) Jul 14
to DataRecoveryCertification
You can use 7Zip to test the integrity of the "X" file types (DOCX, PPTX, XLSX). The following example tests one file, but you could write a batch script to test an entire directory.

"C:\Program Files\7-Zip\7z" t "System Configuration for Macs with the Apple T2 Security Chip.docx"

7-Zip 21.01 alpha (x86) : Copyright (c) 1999-2021 Igor Pavlov : 2021-03-09

Scanning the drive for archives:
1 file, 531204 bytes (519 KiB)

Testing archive: System Configuration for Macs with the Apple T2 Security Chip.docx
--
Path = System Configuration for Macs with the Apple T2 Security Chip.docx
Type = zip
Physical Size = 531204

Everything is Ok

Files: 17
Size:       933661
Compressed: 531204


You can test for an error in your batch file as follows:

IF %ERRORLEVEL% NEQ 0 Echo An error was found in file %f


pbzcbf...@gmail.com

unread,
Jul 14, 2024, 2:36:03 PM (10 days ago) Jul 14
to DataRecoveryCertification
"C:\Program Files\7-Zip\7z" t -r "docx\*.docx" > \docx_test.log 2>&1

Alandata Recovery

unread,
Jul 15, 2024, 6:05:35 PM (9 days ago) Jul 15
to datarecovery...@googlegroups.com
there is this

$199
image.png


--
Data Recovery Certification Group / for issue with google group please email sc...@myharddrivedied.com
---
You received this message because you are subscribed to the Google Groups "DataRecoveryCertification" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datarecoverycertif...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/datarecoverycertification/8766e09a-0873-4109-9ad9-e128b5b646fan%40googlegroups.com.


--
Alandata Data Recovery -  (949)287-3282  
"Cleanroom Data Recovery of RAID, VMware, NAS, Linux, Tape, Disk, Forensics"

jpv...@gmail.com

unread,
Jul 16, 2024, 10:27:45 AM (8 days ago) Jul 16
to datarecovery...@googlegroups.com
Raw recovery using what?

And what file types you're actually trying to get?

If DOCX, XLSX etc. you may want to try Klennet Carver.
--
Data Recovery Certification Group / for issue with google group please email sc...@myharddrivedied.com
---
You received this message because you are subscribed to the Google Groups "DataRecoveryCertification" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datarecoverycertif...@googlegroups.com.

juan van der meulen

unread,
Jul 16, 2024, 10:27:48 AM (8 days ago) Jul 16
to datarecovery...@googlegroups.com
I use SMF tool and you must select the TrID option under folder search then it will display the status of all files and you can sort them and delete all wrong files


--

pbzcbf...@gmail.com

unread,
Jul 16, 2024, 12:53:54 PM (8 days ago) Jul 16
to DataRecoveryCertification
I haven't tested this batch script, but it uses 7Zip to test the integrity of all DOCX files in the specified Source directory and writes the list of bad files to a log. It can be modified to delete the bad files.


@echo off
setlocal enabledelayedexpansion

:: Set the command for testing a file here

set "Test=C:\Program Files\7-Zip\7z.exe t"

:: Set the path to the source files here

set "Source=D:\path\to\source\DOCX"

:: Set the path to the error log file here

set "Log=C:\path\to\log\DOCX_errors.txt"

:: Recursively process DOCX files in the source folder

set /a t=0                            :: initialise total file count
set /a b=0                            :: initialise bad file count

for /r "%Source%" %%F in (*.docx) do (
    echo Testing "%%F" ...
    "%%Test" "%%F" >nul 2>&1
    set /a t+=1                       :: increment total file count

    if %errorlevel% neq 0 (
        echo Error in "%%F">> "%%Log"
        set /a b+=1                   :: increment bad file count
    )
)

echo.
echo Total DOCX files processed = !t!
echo Number of DOCX files with errors = !b!
echo.
endlocal


wayne horner

unread,
Jul 16, 2024, 1:19:05 PM (8 days ago) Jul 16
to datarecovery...@googlegroups.com
How would you test for the first 2 bytes being D0 CF ?

or first block is all zeros ?


Alandata Data Recovery -  (949)287-3282  
"Cleanroom Data Recovery of RAID, VMware, Network Attached Storage, Linux, Tape, Disk, Forensics"


--
Data Recovery Certification Group / for issue with google group please email sc...@myharddrivedied.com
---
You received this message because you are subscribed to the Google Groups "DataRecoveryCertification" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datarecoverycertif...@googlegroups.com.

juan van der meulen

unread,
Jul 16, 2024, 1:31:13 PM (8 days ago) Jul 16
to datarecovery...@googlegroups.com
I use SMF and it is very good with most file tipes, it also got a rating if file might be corrupted or repairable.

Data Recovery Guru

unread,
Jul 16, 2024, 1:32:24 PM (8 days ago) Jul 16
to datarecovery...@googlegroups.com

pbzcbf...@gmail.com

unread,
Jul 16, 2024, 1:36:35 PM (8 days ago) Jul 16
to DataRecoveryCertification
7Zip identifies DOC files as a "Compound" type. It seems to test them OK.

I don't know if SMF actually extracts the components from DOCX/PPTX/XLSX archives, or if just makes some rudimentary checks.

Abdur Rahim Sopon

unread,
Jul 16, 2024, 2:10:46 PM (8 days ago) Jul 16
to datarecovery...@googlegroups.com

Hello, my dear colleague,

The UFS results look very good.
image.png
 

pbzcbf...@gmail.com

unread,
Jul 16, 2024, 2:18:48 PM (8 days ago) Jul 16
to DataRecoveryCertification
Search My Files

Data Recovery Guru

unread,
Jul 16, 2024, 2:20:35 PM (8 days ago) Jul 16
to datarecovery...@googlegroups.com
Aha, many thanks.


On Tue, Jul 16, 2024, 2:18 PM pbzcbf...@gmail.com <pbzcbf...@gmail.com> wrote:
Search My Files

--
Data Recovery Certification Group / for issue with google group please email sc...@myharddrivedied.com
---
You received this message because you are subscribed to the Google Groups "DataRecoveryCertification" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datarecoverycertif...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages