Mr.Syrax
Mr.Syrax

Reputation: 414

Batch file to open specific folders in specific window position

I have a batch file that opens 3 specific folders, but I want the batch file, if possible, to show the windows side by side.

Upvotes: 0

Views: 3906

Answers (1)

JosEduSol
JosEduSol

Reputation: 5436

Consider using VBS(Visual Basic Scripting) for this job.

You can easily arrange the open windows in common ways like: Cascade, TileHorizontally, TileVertically, etc.

For example, the following script will open three specific folders and then tile horizontally the open windows on screen:

Dim shell
Set shell = CreateObject("Shell.Application")

shell.Open "path_folder1"
shell.Open "path_folder2"
shell.Open "path_folder3"

Wscript.Sleep 1000

shell.TileHorizontally

Of course, you can also open the folders from the batch and then call a .vbs script to arrange the windows.

EDIT:

To arrange in the screen only the specific opened windows, we can first minimize all present windows, then do the job:

Dim shell
Set shell = CreateObject("Shell.Application")

shell.MinimizeAll

shell.Open "path_folder1"
shell.Open "path_folder2"
shell.Open "path_folder3"

Wscript.Sleep 1000

shell.TileHorizontally

However, if you want to keep old windows active in the same position they was before and at the same time to arrange ONLY new windows, i don't have a solution right now.

Upvotes: 1

Related Questions