Users like to create sub-folders after sub-folders and give their files long winded names to describe them. This creates a problem to restore files from Shadow Copy which exceeds character limits defined by the operating system.
Shadow Copy makes restoring files fast and easy in most situations. It creates block level snapshots or backup copies of computer files or volumes even when they are in use.
I usually activate them when deploying my Windows based servers. You’d have to use NTFS or ReFS file systems for Shadow Copy to function and to restore files from Shadow Copy.
You’d get the error below when you try to proceed with the restoration procedure:
Sometimes this can be resolved just by copying the files needed into the shortest path possible, which is at the root of the storage drive. But highly likely this step just won’t cut it if you’ve been working long enough.
It can be quite frustrating when such a simple procedure which usually takes less than a minute to complete encounters such an issue. But fret not, you can actually restore files from shadow copy which exceeds character limits with the steps below described below.
Restore files from shadow copy which exceeds character limits
Here’s what you need to do:
Head over to the location where the folder or file that you want to restore is located, right click on it and then select Restore previous versions as below:
Next, it will open up a window list of snapshots, depending on how you configured your Shadow Copy to work. For me, I always set it up to make backup copies up to a month. Open up the folder for which date you’d want to restore from.
Right click on the folder or file which you want to restore and select Properties. Drag the Location information until the end and then copy it.
The next step in this guide on how restore files from shadow copy which exceeds character limits is to launch command prompt and type in the below command.
subst Z: \localhost\D$\@GMT-2021.01.27-04.00.06\Archives\Public\Public-2018\Aircon Issue\Advanced Excel 2007 Working Files
You can replace the drive with any other free drive letters that is available in your Windows operating system.
If you have spaces in the copied path, please put quotes as shown below. If not, an error stating that “Incorrect number of parameters – Issues\Advance” will appear when you enter command.
subst Z: \localhost\D$\@GMT-2021.01.27-04.00.06\Archives\Public\Public-2018\Aircon Issue\”Advanced Excel 2007 Working Files”
A temporary drive shall then be created after you have successfully run the command.
If you click on the temporary drive, you’ll see a list of the same files available there as in the files in the snapshot folder that you opened.
Next, launch Windows PowerShell and run the command below.
robocopy Z: D:\Folder\ /MIR
The above command tells states to copy all the files and folders in temporary drive to a folder named “Folder” in the D: drive. MIR on the other hand tells robocopy to replicate back a complete directory tree.
Once the restoration process is complete, you may then shut down connection of the temporary Z: drive via entering the command below in command prompt:
subst Z: /D
The guide above should help you restore files from shadow copy which exceeds character limits without a hitch if done correctly.
Something to note as why it works with robocopy, this is because it is not limited by 256 character limit defined by the Windows operating system. So copy to your hearts content.
Conclusion: restore files from shadow copy which exceeds character limits
It is not difficult to restore files from shadow copy which exceeds character limits in Windows. Only a few steps are needed to overcome this hurdle and it is mostly short and sweet plus you get to play around in command prompt and PowerShell.
It would be a good idea as well to encourage users to restructure their files and folder naming convention but in my experience that seldom go through. But to those end users who do, props to you and you’re truly a gem!