0

What is wrong with these attempts at a batch file to export my Excel 2003 recent file list?

I keep getting either syntax errors or an error saying that the specified registry key cannot be found. Here are the variations I've tested:

REG EXPORT HKCU\Software\Microsoft\Office\11.0\Excel\"Recent Files" C:\users\Murray\Desktop\Tools\"Restore Excel Recent Files New.reg" /y /reg:64

REG EXPORT HKCU\Software\Microsoft\Office\11.0\Excel\Recent Files\ C:\users\Murray\Desktop\Tools\"Restore Excel Recent Files New.reg" /y /reg:64

REG EXPORT "HKCU\Software\Microsoft\Office\11.0\Excel\Recent Files\" C:\users\Murray\Desktop\Tools\"Restore Excel Recent Files New.reg" /y /reg:64

Here is a copy of a recent export I've done manually using regedit:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Recent Files] "File1"="C:\Users\Murray\Documents\EXCEL\PERSONAL\Brookline\Oil.xls" "File2"="C:\Users\Murray\Desktop\Tools\Trading Log.xls" "File3"="C:\Users\Murray\Documents\EXCEL\PERSONAL\Elliott Wave\FCX.xls" "File4"="C:\Users\Murray\Documents\EXCEL\PERSONAL\Elliott Wave\TLT.xls" "File5"="C:\Users\Murray\Documents\EXCEL\PERSONAL\FCPeuro Orders.xls" "File6"="C:\Users\Murray\Documents\EXCEL\PERSONAL\540_Maintenance.xls" "File7"="C:\Users\Murray\Documents\EXCEL\PERSONAL\Quechee\Propane.xls" "File8"="C:\Users\Murray\Documents\EXCEL\PERSONAL\Suzemax Rates.xls" "File9"="C:\Users\Murray\Documents\EXCEL\PERSONAL\Med19.xls"

The point being the key is located at:

[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Recent Files]

I have a Win 10 64 Home laptop. Thanks for any help.

  • Use the 3rd one and remove the \ after Files - REG EXPORT "HKCU\Software\Microsoft\Office\11.0\Excel\Recent Files" ... – DavidPostill Nov 9 '19 at 23:29
1

Try the following:

REG EXPORT "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Recent Files" "C:\users\Murray\Desktop\Tools\Restore Excel Recent Files New.reg" /y /reg:64

When you have spaces in the key's name, pathname, etc., it is safer to enclose it/them between double-quotes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.