Command Prompt > REG EXPORT > why is this an Invalid syntax?

Posted on

Problem :

I’m trying to export the existing settings for .rtf extension with this:

REG EXPORT HKCR.rtf  %USERPROFILE%Desktoprtf_fta.reg

It says “Invalid syntax”.

What is invalid about it?


It worked with the quotes.


REG EXPORT HKCR.rtf “%USERPROFILE%Desktoprtf_fta.reg”

Solution :

I should have used quotes in the path:

REG EXPORT HKCR.rtf "%USERPROFILE%Desktoprtf_fta.reg"

Leave a Reply

Your email address will not be published. Required fields are marked *