Restore file from VSS (Previous Version) by powershell

Sometimes it really gets too much frustrating when you restore any folder or files from VSS (Previous Version) and you get an error prompt about Source path too long / large destination path / long file name issue. Error screenshot below.


In this situation, we lost our all hope to get the files restored. But with the help of power shell we can do that and we can restore files without any issue.


Way to do that :

1. Open the folder which you wanna restore.
2. Right click any where inside the folder and click propertise.
3. Navigate to "Previous Version" tab and select the VSS point from where you wanna restore the folder/file. As per the below screenshot.



4. Double click on VSS point to open it. Again right click any where inside the folder and click propertise.
5. You will see the location where this backup is stored as per the below screen shot.


6. Copy this entire location then add the folder which you wanna restore. Like below.
Location which i copied from the properties windows : \\localhost\F$\@GMT-2016.05.17-01.30.01\Xfer\IN
Folder which i wanna restore : \\localhost\F$\@GMT-2016.05.17-01.30.01\Xfer\IN\ashish.gupta\folder
7. Open power shell as an administrator and use the below command to restore the folder on your desktop or anywhere you wanna restore it.

PS C:\Windows\system32> robocopy "\\localhost\F$\@GMT-2016.05.17-01.30.01\Xfer\IN\ashish.gupta\folder" C:\Users\ashish.gupta\Desktop /E /COPYALL
Command Screenshot.


Thats it, you will get the entire folder copied with all files.
Thank You

9 comments:

  1. Thanks! It's work!

    ReplyDelete
  2. Wanna is not a word unless you are a baby. Use "Want to"

    ReplyDelete
  3. I'm think this tip is fhan-tashtic!!! I do get very much frustrating when I'm wanna workings on shadowcopy folders and the folders are not showing the folders or subfolders. or folders which the folder name is not a @ and hidden. how?

    ReplyDelete
  4. Long Path Tool will let you easily delete, copy or rename long path files.

    ReplyDelete
  5. Try "LongPathTool program" that is best solution.

    ReplyDelete
  6. This KB is on point, it works perfectly ! Cheers !

    ReplyDelete