Where are Untitled Tabs in VSCode Saved on a Windows System?

Ever wonder how VSCode (Visual Studio Code) maintains those untitled tabs between sessions? They're stored as files underneath your user's profile in appdata on Windows based systems as shown in the following example.

1Get-ChildItem -Path $env:APPDATA\Code\Backups\*\untitled -Recurse


The previous command could be piped to Get-Content to view the contents of all of code in the open untitled tabs of VSCode. You could also use Select-String to find something specific. I can see that three of my open tabs contain 'mikefrobbins'.

1Get-ChildItem -Path $env:APPDATA\Code\Backups\*\untitled -Recurse |
2Select-String -SimpleMatch 'mikefrobbins' |


Concerned about losing information contained in your untitled tabs? You should probably save them, but you also have the option of backing up all of your untitled tabs using the following PowerShell one-liner.

1Get-ChildItem -Path $env:APPDATA\Code\Backups\*\untitled -Recurse |
2Compress-Archive -DestinationPath "C:\tmp\vscode-untitled-tabs$(Get-Date -Format FileDate).zip"