Ordner mit Bildern werden nicht mehr angezeigt

chritu

New Member
Joined
Apr 13, 2026
Messages
9
Auf einmal werden Bilder (jpg) in verschiedenen Unterordnern nicht mehr angezeigt. Windows Fotoanzeige: Dieses Dateiformat wird wahrscheinlich nicht unterstützt. Aber auch andere Programme können diese Bilddateien nicht öffnen. Unbegreiflch, die Dateien müssen definitiv in Ordnung sein. Ein paar jpg habe ich direkt in D:\. Die werden einwandfrei angezeigt. Kann mir das nicht erklären.
 

Hi chritu — if JPGs in D:\ open normally but JPGs in subfolders do not open in Windows Photo Viewer or other apps, the issue is probably not the photo viewer alone. It is more likely one of these:
  • The affected files are corrupted or incomplete
  • The files are not really JPGs despite the .jpg extension
  • There is a permissions/ownership problem in those folders
  • The path or filename is too long or contains unusual characters
  • The drive/file system has errors
  • The files were altered by sync software, backup software, encryption, or malware

1. Quick test: copy one affected JPG to D:\

  1. Pick one JPG that does not open.
  2. Copy it directly to:
D:\test.jpg
  1. Try opening D:\test.jpg.

Result meaning​

  • If D:\test.jpg opens: the file is probably OK, and the problem is related to the folder path, permissions, or filename.
  • If D:\test.jpg still does not open: the file itself is probably damaged, encrypted, incomplete, or not a valid JPG.

2. Check whether the JPG is actually a valid JPG​

  1. Right-click one affected file.
  2. Choose Properties.
  3. Check the Size.
If the size is 0 KB or very small, the file is likely damaged.
You can also check the JPG header with PowerShell:
  1. Open PowerShell.
  2. Run this, replacing the path with one affected file:
Format-Hex "D:\YourFolder\YourImage.jpg" -Count 16
A normal JPG usually starts with:
FF D8 FF
If it does not start like that, Windows is right: the file is probably not a valid JPG anymore.

3. Test with a short folder name​

  1. Create a new folder:
D:\Test
  1. Copy one affected JPG into it.
  2. Rename it to something simple:
photo.jpg
  1. Try opening:
D:\Test\photo.jpg
If this works, the original folder path or filename may be too long or contains problematic characters.

4. Check permissions on the affected folders​

  1. Right-click an affected folder.
  2. Select Properties.
  3. Open the Security tab.
  4. Make sure your Windows user has at least Read permission.
  5. If permissions look wrong, click Advanced and check the owner.
Do not randomly change ownership of the entire drive yet. Test with one affected folder first.

5. Check the drive for file system errors​

Before repairing anything, back up important files from D:\ if possible.
First run a read-only check:
  1. Open Command Prompt as Administrator.
  2. Run:
chkdsk D:
If it reports errors, then run the repair command:
chkdsk D: /f
If Windows says the drive is in use, allow it to schedule the check.

6. Try opening with a robust image viewer​

Install or try one of these:
  • IrfanView
  • XnView MP
  • Paint.NET
  • GIMP
If all of them fail, the files are very likely damaged or not valid JPG files.

7. Important question: were the files synced or restored?​

This often happens after:
  • OneDrive/Google Drive sync problems
  • Copying from an external drive
  • Recovery software
  • Backup restore
  • Disk errors
  • Ransomware/encryption damage
Please check whether the affected JPGs have unusual extensions, strange timestamps, or very small file sizes.

Questions for you​

Please reply with:
  1. Does an affected JPG open after copying it to D:\test.jpg?
  2. What is the file size of one affected JPG?
  3. Does the file start with FF D8 FF in PowerShell?
  4. Are the affected folders on an internal disk, external USB disk, NAS, or cloud-synced folder?
  5. Did anything happen recently — Windows update, disk check, backup restore, sync error, or crash?
If you can, upload one affected JPG and one working JPG for comparison. No attachment came through with your post, so please try uploading again if you intended to include a file.
 

You are right — your PowerShell version apparently does not support the -Count parameter for Format-Hex. That is common on some older Windows PowerShell versions.
Please use this instead.

Option 1: PowerShell-compatible JPG header check​

  1. Open PowerShell.
  2. Run this command, replacing the file path with one affected JPG:
Code:
$path = "D:\YourFolder\YourImage.jpg"
$bytes = [System.IO.File]::ReadAllBytes($path)
$bytes[0..15] | ForEach-Object { "{0:X2}" -f $_ }
A normal JPG should begin with something like:
Code:
FF
D8
FF
E0
or:
Code:
FF
D8
FF
E1
The most important part is:
FF D8 FF

Option 2: Shorter command​

You can also run this:
$bytes = [System.IO.File]::ReadAllBytes("D:\YourFolder\YourImage.jpg"); $bytes[0..15] | % { "{0:X2}" -f $_ }

What the result means​

If the first three bytes are:
Code:
FF
D8
FF
then the file at least has a valid JPG start.
If they are not FF D8 FF, then the file is probably not a real JPG anymore, even if the extension is .jpg.

Important next test​

Please also try this:
  1. Copy one affected JPG into D:\.
  2. Rename it to:
test.jpg
  1. Try opening:
D:\test.jpg
If it opens there, the file is likely OK and the problem is probably the folder path, permissions, or filename. If it still does not open, the file itself is likely damaged or changed.
 

PowerShell 7.6.2
PS C:\Windows\System32> Format-Hex "D:\ana.jpg" -Count 16

Label: D:\ana.jpg

Offset Bytes Ascii
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
------ ----------------------------------------------- -----
0000000000000000 80 B8 77 05 00 00 00 00 5A AB 00 00 78 01 BD FD �¸w� Z« x�½ý

PS C:\Windows\System32>
 

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​

  1. Check backups first — File History, cloud backup, external disk, phone/camera originals.
  2. Try opening the broken file with IrfanView, XnView MP, or GIMP, but if the header is wrong, they will likely fail too.
  3. If the photos are important, use recovery software before running more repair attempts.
  4. Check the drive health with a SMART tool such as CrystalDiskInfo.
  5. 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
 

Yes, a 'good' jpg starts with FF D8 FF. I wonder how dozens of pictures can have been corrupted.
 

Hi chritu — yes, that is the worrying part. If the good JPG starts with FF D8 FF and the bad ones do not, then those affected files were either changed, overwritten, not fully copied, recovered incorrectly, or are sitting on a drive/file system that had trouble.
Dozens of files can become damaged for several common reasons.

Most likely causes​

  1. File-system corruption on D:
    A damaged directory table, bad clusters, or interrupted write operation can affect many files in one folder tree.
  2. Failing HDD/SSD/USB drive
    If D: is an external disk, old HDD, USB stick, SD card, or secondary SSD, drive errors are a strong possibility.
  3. Interrupted copy/move/sync operation
    If the files were moved from camera/phone/cloud/external disk and the operation was interrupted, many files can end up broken.
  4. Recovery software restored wrong data
    Recovered files often keep names like .jpg, but the contents may be unrelated or incomplete.
  5. Cloud/sync placeholder problem
    OneDrive, Google Drive, Dropbox, NAS sync tools, or backup tools can sometimes leave placeholders or partial files.
  6. Encryption/ransomware or third-party software damage
    Less common, but sudden mass corruption should make you check this. Usually ransomware also changes extensions or leaves notes, but not always.

What I would do now​

1. Stop writing to D:

Do not copy, move, rename, or repair lots of files yet.
If the drive is failing, every write can reduce recovery chances.

2. Check whether D: is healthy​

If D: is a physical drive, check SMART status.
  1. Install or open CrystalDiskInfo.
  2. Look at the health status of the drive containing D:.
  3. If it says Caution, Bad, Reallocated Sectors, Pending Sectors, or Uncorrectable Sectors, stop using the disk and clone/recover it first.

3. Run a read-only disk check​

Open Command Prompt as Administrator and run:
chkdsk D:
For now, do not run this yet unless you have backups:
chkdsk D: /f
/f changes the file system. It can help, but if the disk is failing or recovery is needed, it may make later recovery harder.

4. Check timestamps and sizes of bad files​

Run this in PowerShell:
Code:
Get-ChildItem "D:\" -Filter *.jpg -Recurse |
Select-Object FullName,Length,LastWriteTime |
Sort-Object LastWriteTime -Descending |
Out-GridView
Look for patterns:
  • Many files changed at the same time
  • Many files have identical size
  • Very small files
  • Files changed recently without your action
That can show whether a program modified them.

5. Compare headers in bulk​

This shows which .jpg files are valid and which are not:
Code:
Get-ChildItem "D:\" -Filter *.jpg -Recurse | ForEach-Object {
    try {
        $fs = [System.IO.File]::OpenRead($_.FullName)
        $bytes = New-Object byte[] 3
        $null = $fs.Read($bytes,0,3)
        $fs.Close()

        [PSCustomObject]@{
            File = $_.FullName
            Size = $_.Length
            Header = ($bytes | ForEach-Object { "{0:X2}" -f $_ }) -join " "
            ValidJPG = (($bytes | ForEach-Object { "{0:X2}" -f $_ }) -join " ") -eq "FF D8 FF"
            Modified = $_.LastWriteTime
        }
    }
    catch {
        [PSCustomObject]@{
            File = $_.FullName
            Size = $_.Length
            Header = "ERROR"
            ValidJPG = $false
            Modified = $_.LastWriteTime
        }
    }
} | Out-GridView

6. Check backups before repairing​

Look for copies in:
Code:
File History
OneDrive/Google Drive/Dropbox version history
Windows Backup
External backup drive
Phone/camera memory card
Recycle Bin
Previous Versions
Right-click one affected folder and check:
Properties > Previous Versions

7. Run malware scan​

Because many files changed suddenly, run at least:
  1. Open Windows Security.
  2. Go to Virus & threat protection.
  3. Run Full scan.
  4. Then run Microsoft Defender Offline scan.

Important question​

Is D: an internal HDD/SSD, external USB drive, NAS/network drive, SD card, or cloud-synced folder?
That matters a lot. If it is an external HDD/USB/SD card, I would suspect drive/media corruption first. If it is a cloud folder, I would suspect sync or placeholder corruption.
 

Trying to do chkdsk my problem now is that I can't see the window. It seems to open for a second but then: nothing.
 

Hi chritu — that usually happens when chkdsk is started by double-clicking or from the Run dialog: the console opens, runs briefly, then closes before you can read it.
Use one of these methods instead.

Method 1: Open Command Prompt first​

  1. Click Start.
  2. Type:
cmd
  1. Right-click Command Prompt.
  2. Choose Run as administrator.
  3. In the black window, run:
chkdsk D:
  1. Leave the window open and copy/post the result here.
This command is read-only and should not change anything.

Method 2: Use PowerShell/Terminal​

  1. Right-click Start.
  2. Choose Terminal (Admin) or PowerShell (Admin).
  3. Run:
chkdsk D:
Yes, you can run chkdsk from PowerShell/Terminal too.

Method 3: Save the output to a text file​

If the window still disappears or the output is too long, run this from Admin Command Prompt or Admin PowerShell:
chkdsk D: > "%USERPROFILE%\Desktop\chkdsk-D.txt"
Then open this file on your Desktop:
chkdsk-D.txt
You can paste the important parts here, especially lines mentioning:
Code:
bad sectors
file record segment
index errors
Windows found problems
no problems found

Important: Do not run repair yet​

For now, avoid this command unless you have a backup:
chkdsk D: /f
Reason: /f makes changes to the file system. If the drive is failing or the photos need recovery, repair attempts can sometimes make recovery harder.

Also check whether Command Prompt is blocked​

If even an empty Command Prompt immediately closes:
  1. Press Win + R.
  2. Type:
cmd /k
  1. Press Enter.
The /k option tells it to stay open.
Then run:
chkdsk D:
If that still closes instantly, tell me exactly what happens — that would point to a separate Windows/Terminal issue.
 

chkdsk D:
Leave the window open and copy/post the result here.

But there is no window visible!
 

Hi chritu — understood. If there is no visible window at all, don’t try to read it live. Let Windows write the chkdsk result into a text file instead.

1. Run CHKDSK and save the result to Desktop​

  1. Press Win + R.
  2. Paste this command:
cmd /c chkdsk D: > "%USERPROFILE%\Desktop\chkdsk-D.txt" 2>&1
  1. Press Enter.
  2. Wait 1–3 minutes.
  3. Look on your Desktop for:
chkdsk-D.txt
  1. Open that file and copy the result here.
This does not repair anything. It only checks and writes the output to a file.

2. If no text file appears​

Try this version:
  1. Press Win + R.
  2. Paste:
cmd /c chkdsk D: > C:\Users\Public\Desktop\chkdsk-D.txt 2>&1
  1. Press Enter.
  2. Check the desktop again.

3. If the Command Prompt window is off-screen​

It may be opening outside the visible monitor area.
  1. Press Alt + Tab and see whether Command Prompt or Windows Terminal appears.
  2. If yes, select it.
  3. Press Alt + Space.
  4. Press M.
  5. Press one arrow key, for example Left.
  6. Move the mouse — the window may snap back into view.
  7. Click once to place it.
Also try:
Win + Shift + Left Arrow
or:
Win + Shift + Right Arrow
This moves a window between monitors.

4. If you have used a second monitor before​

  1. Press Win + P.
  2. Select:
PC screen only
Then try opening Command Prompt again.

Important​

For now, still use only:
chkdsk D:
Do not run:
chkdsk D: /f
until we see the report, because /f changes the file system.
 

Zugriff verweigert, da Sie nicht über ausreichende Berechtigungen verfügen oder
die Festplatte möglicherweise von einem anderen Prozess gesperrt ist.
Sie müssen dieses Dienstprogramm im erweiterten Modus ausführen
und sicherstellen, dass die Festplatte entsperrt ist.
 

Hi chritu — that message means chkdsk did start, but it was not running with administrator rights. The Win + R command runs normally, not elevated, so Windows blocks chkdsk.
Use this method instead.

Run CHKDSK as administrator and save output​

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Click Run new task.
  3. Type this:
cmd
  1. Tick/check:
Create this task with administrative privileges
  1. Click OK.
  2. In the Administrator Command Prompt, run:
chkdsk D:
This should now show the result.

If the admin window still is not visible​

Use Task Manager again, but run the command directly into a text file:
  1. Press Ctrl + Shift + Esc.
  2. Click Run new task.
  3. Paste this full command:
cmd /c chkdsk D: > "%USERPROFILE%\Desktop\chkdsk-D.txt" 2>&1
  1. Tick/check Create this task with administrative privileges.
  2. Click OK.
  3. Wait a few minutes.
  4. Check your Desktop for:
chkdsk-D.txt
Then open it and paste the result here.

If it still says the disk is locked​

If D: is encrypted with BitLocker or used by another program, check that the drive is unlocked and accessible in Explorer first.
Also close programs that may be using D:, for example:
Code:
Photo viewer
Backup software
Cloud sync tools
Explorer windows open in D:
Image editors

Important​

For now, run only:
chkdsk D:
Do not run this yet:
chkdsk D: /f
/f changes the file system. We should first see whether Windows reports errors.
 

Finally it worked

Der Typ des Dateisystems ist NTFS.
Die Volumebezeichnung lautet Daten.

WARNUNG! Der Parameter /F wurde nicht angegeben.
CHKDSK wird im schreibgeschützten Modus ausgeführt.

Phase 1: Die Basisdatei-Systemstruktur wird untersucht...
Status: 0 von 41984 fertig; Phase: 0%; Insgesamt: 0%; ETA: 0:02:03
Status: 33025 von 41984 fertig; Phase: 78%; Insgesamt: 28%; ETA: 0:01:29 .
Status: 41984 von 41984 fertig; Phase: 100%; Insgesamt: 35%; ETA: 0:01:21 ..


41984 Datensätze verarbeitet.
Dateiüberprüfung beendet.
Phasendauer (Datei-Datensatz Überprüfung): 583.82 Millisekunden.
Status: 1226 von 1226 fertig; Phase: 100%; Insgesamt: 29%; ETA: 0:01:45 ...


1226 große Datensätze verarbeitet.
Phasendauer (Wiederherstellung für verwaisten Datei-Datensatz): 0.78 Millisekunden.
Status: 0 von 0 fertig; Phase: 99%; Insgesamt: 29%; ETA: 0:01:45


0 ungültige Datensätze verarbeitet.
Phasendauer (Prüfung auf falschen Datei-Datensatz): 0.04 Millisekunden.

Phase 2: Die Dateinamenverknüpfung wird untersucht...
Status: 1161 von 1161 fertig; Phase: 100%; Insgesamt: 59%; ETA: 0:01:02 .


1161 Analysedatensätze verarbeitet.
Status: 42366 von 45614 fertig; Phase: 92%; Insgesamt: 68%; ETA: 0:00:47 ..
Status: 43797 von 45614 fertig; Phase: 96%; Insgesamt: 81%; ETA: 0:00:01 ...
Status: 45614 von 45614 fertig; Phase: 100%; Insgesamt: 81%; ETA: 0:00:01


45614 Indexeinträge verarbeitet.
Indexüberprüfung beendet.
Phasendauer (Indexüberprüfung): 903.39 Millisekunden.
Status: 0 von 0 fertig; Phase: 99%; Insgesamt: 81%; ETA: 0:00:01 .


0 nicht indizierte Dateien überprüft.
Phasendauer (Wiederverbindung für verwaisten Datensatz): 3.46 Millisekunden.
Status: 0 von 0 fertig; Phase: 99%; Insgesamt: 81%; ETA: 0:00:01 ..


0 nicht indizierte Dateien wiederhergestellt.
Phasendauer (Wiederherstellung für verwaiste Datensatz): 0.04 Millisekunden.
Status: 1161 von 1161 fertig; Phase: 100%; Insgesamt: 81%; ETA: 0:00:01 ...


1161 Analysedatensätze verarbeitet.
Phasendauer (Überprüfung von Analysepunkts und Objekt-ID): 2.90 Millisekunden.

Phase 3: Sicherheitsbeschreibungen werden untersucht...
Überprüfung der Sicherheitsbeschreibungen beendet.
Phasendauer (Überprüfung für Sicherheits-Deskriptor): 0.99 Millisekunden.
Status: 0 von 0 fertig; Phase: 100%; Insgesamt: 99%; ETA: 0:00:00


1816 Datendateien verarbeitet.
Phasendauer (Datenattributüberprüfung): 0.12 Millisekunden.
CHKDSK überprüft USN-Journal...
Status: 109 von 109 fertig; Phase: 100%; Insgesamt: 99%; ETA: 0:00:00 .


893792 USN-Bytes verarbeitet.
Die Überprüfung von USN-Journal ist abgeschlossen.
Phasendauer (USN-Journalüberprüfung): 5.33 Millisekunden.

Dateisystem wurde überprüft, keine Probleme festgestellt.
Keine weiteren Aktionen erforderlich.

339775484 KB Speicherplatz auf dem Datenträger insgesamt
250464772 KB in 32894 Dateien
14388 KB in 1817 Indizes
0 KB in fehlerhaften Sektoren
119452 KB vom System benutzt
65536 KB von der Protokolldatei belegt
89176872 KB auf dem Datenträger verfügbar

4096 Bytes in jeder Zuordnungseinheit
84943871 Zuordnungseinheiten auf dem Datenträger insgesamt
22294218 Zuordnungseinheiten auf dem Datenträger verfügbar
Gesamtdauer: 1.50 Sekunden (1501 ms).
 

Hi chritu — good, chkdsk D: completed successfully.

What the CHKDSK result means​

The important lines are:
Code:
Dateisystem wurde überprüft, keine Probleme festgestellt.
Keine weiteren Aktionen erforderlich.
and:
0 KB in fehlerhaften Sektoren
So Windows found no NTFS file-system damage and no bad sectors reported through this check.
That means: do not run chkdsk D: /f now. There is currently nothing for /f to fix.

But this does not prove the JPG contents are OK​

chkdsk checks the file system structure: indexes, security descriptors, file records, allocation tables, etc.
It does not verify whether the inside of ana.jpg is a valid photo.
Since your broken file starts with:
80 B8 77 05 ...
instead of:
FF D8 FF ...
the file content itself is wrong/corrupted/altered, even though NTFS says the file is stored normally.

Next useful check: find all affected JPGs​

Run this in PowerShell:
Code:
Get-ChildItem "D:\" -Filter *.jpg -Recurse | ForEach-Object {
    try {
        $fs = [System.IO.File]::OpenRead($_.FullName)
        $bytes = New-Object byte[] 3
        $null = $fs.Read($bytes,0,3)
        $fs.Close()

        $header = ($bytes | ForEach-Object { "{0:X2}" -f $_ }) -join " "

        [PSCustomObject]@{
            File = $_.FullName
            Size = $_.Length
            Header = $header
            ValidJPG = $header -eq "FF D8 FF"
            Modified = $_.LastWriteTime
        }
    }
    catch {
        [PSCustomObject]@{
            File = $_.FullName
            Size = $_.Length
            Header = "ERROR"
            ValidJPG = $false
            Modified = $_.LastWriteTime
        }
    }
} | Sort-Object ValidJPG, Modified | Out-GridView
Look especially for:
ValidJPG = False
Then check whether the broken files have:
  • The same or similar Modified date
  • Similar file sizes
  • The same strange header
  • Location in the same subfolder tree

Also export the list to a file​

If you want a text/CSV list, use:
Code:
Get-ChildItem "D:\" -Filter *.jpg -Recurse | ForEach-Object {
    try {
        $fs = [System.IO.File]::OpenRead($_.FullName)
        $bytes = New-Object byte[] 3
        $null = $fs.Read($bytes,0,3)
        $fs.Close()

        $header = ($bytes | ForEach-Object { "{0:X2}" -f $_ }) -join " "

        [PSCustomObject]@{
            File = $_.FullName
            Size = $_.Length
            Header = $header
            ValidJPG = $header -eq "FF D8 FF"
            Modified = $_.LastWriteTime
        }
    }
    catch {
        [PSCustomObject]@{
            File = $_.FullName
            Size = $_.Length
            Header = "ERROR"
            ValidJPG = $false
            Modified = $_.LastWriteTime
        }
    }
} | Export-Csv "$env:USERPROFILE\Desktop\jpg-check.csv" -NoTypeInformation -Encoding UTF8
This creates:
jpg-check.csv
on your Desktop.

My current conclusion​

Your disk file system looks OK, but some JPG file contents are no longer valid JPG data. The most likely causes now are:
  1. Bad copy/move operation
  2. Sync/backup software damaged or replaced the files
  3. Recovery software produced invalid JPG files
  4. Some program wrote wrong data into those files
  5. Drive issue not visible to CHKDSK, so still check SMART health

Please check drive health next​

Use a SMART tool such as CrystalDiskInfo and check the drive containing D:.
Important values to look for:
Code:
Reallocated Sectors
Current Pending Sector Count
Uncorrectable Sector Count
Health Status
If the status is Caution or Bad, stop using the drive and copy/recover data first.

One question​

Are the bad pictures all from the same source — for example phone import, camera card, recovery program, OneDrive/Google Drive, or an old backup?
 

I generated a csv. There are thousands of wrong files. Pretty old most of them. Different sources. I cannot explain what happened. The state of my SSD is good (96%).
Anyway, I want to thank you VERY MUCH! Excellent service and help.
 

You’re very welcome, chritu — and thank you for reporting back.

What your findings suggest​

If there are thousands of invalid .jpg files, many of them old, from different sources, and the SSD health is still 96%, then this is less likely to be a simple current NTFS problem.
Most likely possibilities are:
  1. Old corruption that went unnoticed
    The files may have been damaged long ago, but only noticed now when you tried to open them.
  2. Bad import/copy/backup event in the past
    A failed migration, restore, copy from another drive, recovery program, or sync issue can create many files with correct names but wrong contents.
  3. Files restored from damaged media
    Recovery tools often recreate filenames/extensions, but the internal data may be wrong.
  4. Application or sync software replaced content
    Less common, but possible if some tool processed or synchronized those folders incorrectly.
  5. Not an active SSD failure
    A 96% SSD health reading is reassuring. It does not prove the old files were always valid, but it makes an ongoing disk failure less likely.

What I would do now​

1. Preserve the current state​

Do not mass-delete the broken files yet. Keep the CSV and the damaged files for reference.

2. Search backups by filename​

Use your CSV list to search for the same filenames in:
Code:
External backups
Old PCs/laptops
Cloud storage version history
Phone/camera storage
SD cards
NAS backups
Windows File History

3. Check “Previous Versions”​

For important folders:
  1. Right-click the folder.
  2. Open Properties.
  3. Go to Previous Versions.
  4. Restore only to a different folder first, not over the current one.

4. Keep the SSD monitored​

Even though it looks healthy, check it again occasionally. If SMART values remain stable, the SSD probably is not the main cause.

5. Strengthen backup strategy​

For photos, I strongly recommend at least:
1 local backup + 1 external/offline backup + 1 cloud or off-site backup
Also useful: periodically verify backups by actually opening random files.

Final note​

Based on the JPG header checks, you did the right diagnostic path. Windows was not “confused”; the affected files really do not contain normal JPG data anymore. The hard part is that the damage may have happened long before it became visible.
Glad I could help you narrow it down. Sorry the result wasn’t better — but at least now you know not to waste time reinstalling photo viewers or repairing Windows.
 

Back
Top