nil 发表于 2024-10-28 21:23:28

複製檔案名稱過長解決方法

Unable to restore file due to long file name


I was working with a customer who had accidently deleted some files when copying them to a different drive. When trying to restore them using the Previous Versions option, I got a message saying that the source file name was too long. I tried everything, but eventually the steps below worked for me:

Right click on the folder you're trying to restore from shadow copy and chose Previous Versions. Chose a date and click on Open.

Right click on any file or folder within the previous folder and chose Properties. On the General tab copy what's shown in 'location', e.g.: \\localhost\D$\@GMT-2011.09.20-06.00.04\_Data

Open cmd.exe and type in - subst X: \\localhost\D$\@GMT-2011.09.20-06.00.04\_Data

Open PowerShell and use robocopy to copy content of X:- robocopy Z: D:\Folder\ /E /COPYALL

Check that all files have been copied.

When finished type - subst X: /D in cmd.exe
页: [1]
查看完整版本: 複製檔案名稱過長解決方法