0

In my batch file, I am calling a new Windows file explorer at a specific location by using the following:

echo off
explorer.exe "C:/Users"

The user then navigates to other folders as needed. Then, when I call the batch file a second time I would like Windows to reuse the first instance of explorer.exe instead of launching another explorer.exe.

This will be the only copy of explorer.exe open on the computer at the time I run this batch file.

How can I do this?

2

You can use the start command to re-use instances of Windows file explorer.

Change your batch file to:

echo off 
start "C:\Users"
  • In my experience you have to add "" as a dumym first argument to strat, otherwise it will interpret the quoted path as the title to an empty process, rather than the proper resource to open. – entonio May 1 '19 at 19:10

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.