Renaming a Windows directory

I need to preserve a Windows directory as “directory.bak”. I was hoping this might work, but it doesn’t:

  • raw: c:\windows\system32\cmd.exe rename C:\directory C:\directory.bak

Is there a way to accomplish what I’m looking to do?

Thanks

I found the solution:

  • raw: c:\windows\system32\cmd.exe /C rename C:\testdir testdir.bak