Hi
chritu — that output shows the key point:
80 B8 77 05 00 00 00 00 5A AB 00 00 78 01 BD FD
A valid JPG should normally start with:
FF D8 FF
Your file
does not start with a JPG header. So Windows is not just misreading it —
D:\ana.jpg is currently
not a valid JPG file, even though the file extension is
.jpg.
What this means
The file may be:
- Corrupted
- Partially overwritten
- Encrypted by some software
- A different file type renamed to
.jpg
- Damaged by disk/file-system errors
- A placeholder or broken sync/recovery file
Unfortunately, the statement “the files must definitely be OK” does not match the file header. At least this tested file is
not structurally a normal JPG anymore.
1. Compare with a working JPG
Please test one of the JPGs that still opens correctly in
D:\.
Format-Hex "D:\working-photo.jpg" -Count 16
Expected beginning:
FF D8 FF
If the working one starts with
FF D8 FF and the broken one starts with
80 B8 77 05, then the broken files are genuinely altered/damaged.
2. Check file size
Run:
Get-Item "D:\ana.jpg" | Select-Object Name,Length,LastWriteTime
If the size is very small, zero, or suspiciously similar across many broken files, that is a strong corruption/encryption clue.
3. Stop writing to drive D: for now
Important: If these photos are valuable, avoid copying new files to
D:\ until you know what happened. New writes can overwrite recoverable data.
4. Run a read-only disk check first
Do
not start with repair mode yet. First check only:
chkdsk D:
If it reports errors, back up what you can first, then consider:
chkdsk D: /f
Warning: chkdsk /f can make file-system changes. It may help with structure problems, but it is not a photo repair tool and can sometimes make recovery harder if the disk is failing.
5. Check whether many files have the same bad header
You can scan JPG headers in a folder with this PowerShell command:
Code:
Get-ChildItem "D:\YourFolder" -Filter *.jpg -Recurse | ForEach-Object {
$b = [System.IO.File]::ReadAllBytes($_.FullName)
[PSCustomObject]@{
File = $_.FullName
Header = ($b[0..2] | ForEach-Object { "{0:X2}" -f $_ }) -join " "
Size = $_.Length
}
}
Valid JPGs should show:
FF D8 FF
If many affected files show something else, they are not readable JPG files anymore.
6. Possible next steps
- Check backups first — File History, cloud backup, external disk, phone/camera originals.
- Try opening the broken file with IrfanView, XnView MP, or GIMP, but if the header is wrong, they will likely fail too.
- If the photos are important, use recovery software before running more repair attempts.
- Check the drive health with a SMART tool such as CrystalDiskInfo.
- Run a malware scan if many files changed suddenly.
My current assessment
Based on the header you posted,
D:\ana.jpg is
not a valid JPG file at the binary level. The next important question is whether the broken files are damaged copies, encrypted files, or the result of disk/file-system corruption.
Please post the result of these two commands for one working JPG and one broken JPG:
Code:
Format-Hex "D:\ana.jpg" -Count 16
Get-Item "D:\ana.jpg" | Select-Object Name,Length,LastWriteTime