VSS Restore Source Path Too Long Error
Hello, I'm trying to restore some files, that were accidently deleted by a user, using the restore previous versions functionality of 2k8r2. I can see the previous version just however no matter how I try and restore them -same location, new location, copying - I get an error stating that the source path is too long. Any ideas on a way around this? Thanks, Jason
August 25th, 2010 10:40am

Hi Jason, In the Windows API, the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:\<some 256-character path string><NUL>" where "<NUL>" represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.) I suspect that the file you want to restore is in a deep path that exceeds the MAX_PATH. Please try to use Windows Backup to restore the file instead of using the Previous Versions tab in the Properties of the file and see whether it works. Regards, Karen JiPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2010 4:01am

i also have faced the same problme and following software sort out my problem www.longPathTool.com some of the features of this softwares are: Path too long. Error cannot delete file: cannot read from source file or disk. Cannot delete file: Access is denied. There has been a sharing violation. Cannot delete file or folder The file name you specified is not valid or too long. Specify a different file name. The source or destination file may be in use. The file is in use by another program or user. Error Deleting File or Folder Make sure the disk is not full or write-protected and that the file is not currently in use. Path too deep.
January 3rd, 2011 7:54am

I've found this workaround to get me out of trouble but it's not a process I'd want to have to repeat often. Hope it helps. Right click the folder or file you want to restore and click properties. Click the previous versions tab. Select the version you want to restore and click open. This will open an explorer window. Within the new explorer window, right click the parent folder of what you wish to restore and select properties. On the general tab you'll see a location field that looks something like \\localhost\C$\@GMT-2011.01.31-01.00.22\RestoreFolderPath. Copy this location to the clipboard. Open a command prompt and use the subst command to create a drive letter further up the directory tree, nearer to where you're restoring the files from. e.g. subst f: \\localhost\C$\@GMT-2011.01.31-01.00.22\RestoreFolderPath You should now be able to copy your restore files directly from F: drive (orwhatever drive letter you used in the subst command) in windows exporer or a command prompt. When you're done then delete the f: drive mount by executing subst f: /d Regards, Michael
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2011 6:55pm

Thanks Michael Just used your solution and it worked perfectly.
April 19th, 2012 5:42pm

I've found this workaround to get me out of trouble but it's not a process I'd want to have to repeat often. Hope it helps. Right click the folder or file you want to restore and click properties. Click the previous versions tab. Select the version you want to restore and click open. This will open an explorer window. Within the new explorer window, right click the parent folder of what you wish to restore and select properties. On the general tab you'll see a location field that looks something like \\localhost\C$\@GMT-2011.01.31-01.00.22\RestoreFolderPath. Copy this location to the clipboard. Open a command prompt and use the subst command to create a drive letter further up the directory tree, nearer to where you're restoring the files from. e.g. subst f: \\localhost\C$\@GMT-2011.01.31-01.00.22\RestoreFolderPath You should now be able to copy your restore files directly from F: drive (orwhatever drive letter you used in the subst command) in windows exporer or a command prompt. When you're done then delete the f: drive mount by executing subst f: /d Regards, Michael This works - however I found I had to subst/map a drive for both the location (subst F:...) and the destination folder aswell! Otherwise i still received the file path too long error.
Free Windows Admin Tool Kit Click here and download it now
May 10th, 2012 11:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics