update svn in windows explorer address bar, how to keep CMD open

0

This is a very common question. Here's a new spin to it:

I usually run commands directly in windows explorer windows (i.e. where you type the path in windows explorer). I often find myself typing e.g. svn update but then can't read the ouput. Unfortunately common fixes like svn update & pause or && pause don't seem to have any effect.

why is this? And what could a possible fix be without registry modifications?

user2305193

Posted 2019-12-05T08:03:59.353

Reputation: 113

Answers

2

Commands you type in the address bar are not executed from within a 'DOS prompt', so pause, which is a DOS command, is never going to work. It's basically the same as typing Win + R, and then running the pause command. Try it and you will see what I mean.

There are some workarounds though:

One way would be to type cmd /k svn update. The cmd command starts a DOS prompt, and specifying the /k parameter will cause it to not be closed after the command is executed. Run cmd /h from a command prompt to see help about all parameters.

Another option is to create a batch file containing the commands, e.g.

svn update
pause

and then run that batch file from the address bar.

A third idea: Just type cmd, and keep the command prompt open as long as you need it. This has the advantage that you can use the command history. For instance type Enter to repeat the last command.

Berend

Posted 2019-12-05T08:03:59.353

Reputation: 1 824

1awesome, can you quickly save readers a google and explain cmd /k? – user2305193 – 2019-12-05T09:10:07.337

did quickly google it: CMD /C Run Command and then terminate :: CMD /K Run Command and then return to the CMD prompt. This is useful for testing, to examine variables – user2305193 – 2019-12-05T09:12:17.893

@user2305193 Good point, I added a short explanation. – Berend – 2019-12-05T10:46:20.617

any more resources on the differences between cmd and 'run' would be helpful, but I guess googling (knowing there is a fundamental difference) already helps – user2305193 – 2019-12-05T11:42:56.843