Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Batch script to Launch Multiple Instances of Windows Explorer at Same Location

I have a batch script on my Windows XP desktop (LaunchWindowsExplorers.bat) which should launch a couple of instances of Windows Explorer.

It looks like this:

LaunchWindowsExplorers.bat :

start explorer "C:\SomeDirectory" 
start explorer "C:\SomeDirectory" 

When I double click the file LaunchWindowsExplorers.bat

I would expect to see

  • two instances of Windows Explorer opened at "C:\SomeDirectory" .

Instead, I see

  • just one instance of Windows Explorer opened at "C:\SomeDirectory".

What would I need to do to make this script open two instances of Windows Explorer, each of which opened at "C:\SomeDirectory"?

Thanks.

like image 437
JW. Avatar asked Sep 22 '12 12:09

JW.


People also ask

How can you launch multiple windows of File Explorer?

When you want to open multiple Windows file explorers, simply press the shortcut Windows key + E. As soon as you press the keyboard shortcut, Windows opens a new instance of the file explorer. So, if you want three file explorer windows, press the keyboard shortcut three times.


2 Answers

You may use explorer /n,"C:\SomeDirectory", explorer /e,"C:\SomeDirectory" or explorer /root,"C:\SomeDirectory" (depending on a view you want). Explanation of the options taken from here: http://support.microsoft.com/kb/314853:

Option Function


/n Opens a new single-pane window for the default selection. This is usually the root of the drive that Windows is installed on. If the window is already open, a duplicate opens.

/e Opens Windows Explorer in its default view.

/root,<object> Opens a window view of the specified object.

/select,<object> Opens a window view with the specified folder, file, or program selected.


What's interesting, this behavior (not showing second window for the same directory) seems specific to XP. Win7 simply starts second copy of explorer. I have not checked Vista.

like image 71
wmz Avatar answered Oct 22 '22 16:10

wmz


Though I'm not sure of the solution, have you tried changing it to something like:
start explorer "C:\SomeDirectory"
start explorer "C:\AnotherDirectory"
and checked what happens?
I would assume what's happening is that start explorer has a check to see if there is already an explorer open, and it only opens a new one if that's false (otherwise it just redirects the currently open one).
Sorry I couldn't be of more help.

like image 1
Bertie Wheen Avatar answered Oct 22 '22 15:10

Bertie Wheen