Skip to content

Quickly restores deleted or old files in vscode by recreating the file's path, name, and restoring it through vscodes's local history.

License

Notifications You must be signed in to change notification settings

Py-mon/Bulk-Vscode-Restore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Quickly restores numerous lost or deleted files in vscode by recreating the right file path, name, and restoring it through vscodes's local history.

Local History

Have you accidentally permanently deleted some important programming files? If you were using vscode, local history is here to save you.

You can find it at the bottom left in the timeline.

image

You can also find it by pressing CTRL+SHIFT+P and then typing Explorer: Focus on Timeline View image

It stores a a bunch of the last saves for each file you ever had. You can right-click on point and restore it.

image

Problems with Local History

If you deleted a file you will have to put the file back with the right path and name in order to restore it. If you deleted hundreds of files this can be very tedious. Bulk-Vscode-Restore can recreate the right file path, name, and restore the latest save for hundreds of files instantly.

Usage

  1. Copy the code from restore.py or clone the repository using git clone https://github.com/PythonDominator/Bulk-Vscode-Restore
  2. Naviagate the parent folder of where you put restore.py in
  3. Find where local history is stored (For Windows it is usually C:\Users\[YOUR_USERNAME_HERE]\AppData\Roaming\Code\User\History)
  4. Run:
python restore.py [restore_from] [history] [restore_to]
usage: restore.py [-h] [--no-entries] [--no-date] restore_from history restore_to

Easily bulk restore files in vscode.

positional arguments:
  restore_from  The folder that gets restored.
  history       The vscode folder where local history is stored. Changes depending on OS but    
                for windows usually C:\Users\{USER_NAME}\AppData\Roaming\Code\User\History      
  restore_to    Where folder gets restored.

options:
  -h, --help    show this help message and exit
  --no-entries  Doesn't show the amount of entries in files.
  --no-date     Doesn't show the date of the last save.

Example:

python restore.py C:\Users\Joe\Downloads\Programming\MyLostProject C:\Users\Joe\AppData\Roaming\Code\User\History C:\Users\Joe\OneDrive\Documents\RestoredProject

Please let me know if you have any questions or if I helped you restore any files.

About

Quickly restores deleted or old files in vscode by recreating the file's path, name, and restoring it through vscodes's local history.

Topics

Resources

License

Stars

Watchers

Forks

Languages