Fixing Windows Screenshot and Camera Roll Sync with OneDrive Using Codex Computer Use

Using the Codex Windows app with computer use made it much easier to identify and fix a confusing Windows 11 and OneDrive setup. Screenshots could appear in the local Pictures folder, another copy could appear in OneDrive, and the OneDrive settings UI could make it look like screenshot syncing was already enabled even when the Windows screenshot folder was not actually backed up.

This post describes a real troubleshooting workflow using the Codex Windows app with computer use. The goal was not just to explain OneDrive settings, but to use Codex to inspect the machine, compare the actual folders, identify stale shortcuts, and verify the final behavior with test screenshots and a test Camera app photo.

No personal folder names are needed to understand the pattern. The important paths are the standard Windows and OneDrive locations:

C:\Users\<you>\Pictures
C:\Users\<you>\Pictures\Screenshots
C:\Users\<you>\Pictures\Camera Roll
C:\Users\<you>\OneDrive\Pictures
C:\Users\<you>\OneDrive\Pictures\Screenshots
C:\Users\<you>\OneDrive\Pictures\Camera Roll

The Problem

The desired end state was simple:

  • Windows 11 screenshots should sync to OneDrive automatically.
  • Camera Roll content should live under OneDrive Pictures.
  • Android or mobile photo upload into OneDrive should keep working.
  • Screenshots should not be split across multiple places.
  • Duplicate screenshot behavior should be avoided.

The machine already had a OneDrive Pictures folder with subfolders such as:

OneDrive\Pictures\Screenshots
OneDrive\Pictures\Camera Roll

But Windows was also saving screenshots locally under:

Pictures\Screenshots

There were also OneDrive shortcut files inside the local Pictures folders, such as:

Shortcut to Pictures (OneDrive - Personal).lnk
Shortcut to Screenshots (OneDrive - Personal).lnk
Shortcut to Camera Roll (OneDrive - Personal).lnk

That raised the main question: was this already syncing, partially syncing, previously syncing, or just leaving behind old OneDrive shortcuts?

Using Codex to Inspect the Real State

Rather than infer from the UI, Codex inspected the filesystem and Windows known-folder registry settings from PowerShell.

First, it checked whether the local folders were normal directories, symlinks, or junctions:

Get-Item -LiteralPath `
  "$env:USERPROFILE\Pictures\Camera Roll", `
  "$env:USERPROFILE\Pictures\Screenshots", `
  "$env:USERPROFILE\OneDrive\Pictures", `
  "$env:USERPROFILE\OneDrive\Pictures\Camera Roll", `
  "$env:USERPROFILE\OneDrive\Pictures\Screenshots" -Force |
  Select-Object FullName,Mode,Attributes,LinkType,Target,LastWriteTime |
  Format-List

The local Pictures\Screenshots and Pictures\Camera Roll folders were normal directories. The OneDrive folders had OneDrive-style reparse point attributes, which is expected for Files On-Demand placeholders. There was no evidence that the local screenshot folder was a junction into OneDrive.

Next, Codex inspected the .lnk files to see where the shortcuts actually pointed:

$shell = New-Object -ComObject WScript.Shell

Get-ChildItem -LiteralPath "$env:USERPROFILE\Pictures" -Filter '*.lnk' -Recurse -Force |
  ForEach-Object {
    $shortcut = $shell.CreateShortcut($_.FullName)
    [pscustomobject]@{
      Name        = $_.Name
      FullName    = $_.FullName
      TargetPath  = $shortcut.TargetPath
      Description = $shortcut.Description
    }
  } |
  Format-List

This showed that at least some shortcuts were just breadcrumbs back to OneDrive folders. Those are commonly left behind when OneDrive folder backup has previously been enabled and then stopped or changed.

Then Codex checked the Windows known-folder registry entries:

Get-ItemProperty -Path `
  'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' |
  Select-Object 'My Pictures','{0DDD015D-B06C-45D5-8C4C-F59713854639}' |
  Format-List

The key result was that Windows still considered the Pictures folder to be:

C:\Users\<you>\Pictures

not:

C:\Users\<you>\OneDrive\Pictures

That meant OneDrive Pictures backup was not currently managing the Windows Pictures known folder.

The Confusing Part: OneDrive Screenshot Toggle

The OneDrive settings screen showed:

Save screenshots I capture to OneDrive: On

At first glance, that sounds like the whole problem is already solved. But Codex compared the newest files in both screenshot folders:

Get-ChildItem -LiteralPath "$env:USERPROFILE\OneDrive\Pictures\Screenshots" -File -Force |
  Sort-Object LastWriteTime -Descending |
  Select-Object -First 12 Name,Length,LastWriteTime,Attributes

Get-ChildItem -LiteralPath "$env:USERPROFILE\Pictures\Screenshots" -File -Force |
  Sort-Object LastWriteTime -Descending |
  Select-Object -First 12 Name,Length,LastWriteTime,Attributes

That revealed two different screenshot flows:

  • OneDrive's screenshot capture was saving files like 2026-05-20.png into OneDrive\Pictures\Screenshots.
  • Windows 11 was also saving files like Screenshot 2026-05-20 105039.png into the local Pictures\Screenshots folder.

So the OneDrive screenshot toggle was working, but it was not the same thing as backing up the Windows Pictures known folder. It could create a second screenshot copy while Windows continued to save its own screenshot file locally.

The Better Fix

The clean fix was:

  1. Turn off OneDrive's separate Save screenshots I capture to OneDrive setting.
  2. Enable OneDrive backup for the Pictures known folder.
  3. Leave other known folders such as Desktop, Documents, Music, and Videos off unless they should also be backed up.
  4. Take a test screenshot.
  5. Take a test photo with the Windows Camera app.
  6. Verify where both files landed.

This creates one normal Windows Pictures tree that is backed by OneDrive:

OneDrive\Pictures
OneDrive\Pictures\Screenshots
OneDrive\Pictures\Camera Roll
OneDrive\Pictures\Saved Pictures

The important distinction is that OneDrive folder backup does not behave like two independent folders syncing forever:

Pictures <-> OneDrive\Pictures

Instead, Windows redirects the Pictures known folder so that the effective Pictures folder lives under OneDrive:

C:\Users\<you>\OneDrive\Pictures

After that, apps that save to the normal Windows Pictures locations naturally save into the OneDrive-backed tree.

Verifying the Result

After enabling Pictures backup, the checks were simple.

For screenshots:

Get-ChildItem -LiteralPath "$env:USERPROFILE\OneDrive\Pictures\Screenshots" -File -Force |
  Sort-Object LastWriteTime -Descending |
  Select-Object -First 20 Name,Length,LastWriteTime

The old local Windows screenshots were merged into the OneDrive Screenshots folder, and new screenshots appeared there as expected.

For Camera Roll, a first test photo from the Windows Camera app was saved here:

C:\Users\<you>\OneDrive\Pictures\Camera Roll

That confirmed that Camera app content also followed the OneDrive-backed Pictures folder.

What About Existing Mobile Uploads?

OneDrive mobile camera upload commonly uses:

OneDrive\Pictures\Camera Roll

Enabling Windows Pictures backup does not inherently stop mobile camera upload from using that folder. In this case, the desired result was for both Windows Camera Roll behavior and mobile photo upload behavior to live under the same OneDrive Pictures tree.

The local Pictures\Camera Roll folder was nearly empty before the change, which reduced the risk of a messy merge. The real mobile photo structure already existed under OneDrive\Pictures\Camera Roll.

What About the Shortcut Files?

After the fix, some shortcut files may remain, for example:

Shortcut to Camera Roll (OneDrive - Personal).lnk

These are usually harmless leftovers from earlier OneDrive folder backup states. A .lnk shortcut can be deleted later if it is just clutter, but it is worth verifying the target first. Deleting a shortcut is not the same as deleting the folder it points to.

Why Codex Computer Use Helped

The useful part of Codex computer use was not that it knew a generic OneDrive answer. The useful part was that it could inspect the actual machine state:

  • list the real folders,
  • detect whether a path was a normal folder or reparse point,
  • inspect shortcut targets,
  • compare file counts and newest files,
  • read Windows known-folder registry values,
  • interpret the OneDrive settings screenshots,
  • and verify the result after test captures.

That turned a vague "OneDrive is confusing" problem into a concrete diagnosis:

  • The OneDrive screenshot toggle was on.
  • Pictures backup was off.
  • Windows Screenshots and OneDrive Screenshots were both receiving files through different mechanisms.
  • Enabling Pictures backup and disabling the separate screenshot toggle produced a single cleaner flow.

Final State

The final setup was:

  • OneDrive Save screenshots I capture to OneDrive: off.
  • OneDrive folder backup for Pictures: on.
  • Windows screenshots saved under OneDrive\Pictures\Screenshots.
  • Windows Camera app photos saved under OneDrive\Pictures\Camera Roll.
  • Existing mobile camera upload continued using OneDrive Pictures.
  • Old local screenshots were merged into the OneDrive-backed Screenshots folder.

For a Windows 11 user trying to diagnose the same issue, the key is to check the actual known-folder path and the newest files in both locations. The OneDrive settings UI can be technically true while still leaving screenshots split across two different save paths.