I am trying to display the current timestamp in the console dialog of Notepad++.

If I give the command in the Execute... dialog

echo %time%

I get

================ READY ================

and the current time is not being displayed like it would in the cmd prompt.

Does anyone know how to get the time printed?

1 Answer 1



cmd /c echo %time%

that should do the trick.

Some background information: echo is a build-in command of the windows command shell cmd, not an executable, so you cannot run it directly by Notepad++. But cmd has a command line option /c where you can pass build-ins as a parameter, to let the command shell execute them for you. The @ sign is only understood within the command shell, too.

  • Yes this has worked fine. If I add @echo off I get this error CreateProcess() failed with error code 2: The system cannot find the file specified.
    – Animesh
    Dec 16, 2011 at 14:30
  • Marking this as answer as it is working for me.
    – Animesh
    Dec 16, 2011 at 14:41
  • @Kishor: see my edit.
    – Doc Brown
    Dec 16, 2011 at 15:13
  • I understand now. I tried doing: cmd /c @echo off but it did not work. I will do just fine without it. Thanks
    – Animesh
    Dec 16, 2011 at 15:45

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.