Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file for multi folders  (Read 536 times)

0 Members and 1 Guest are viewing this topic.

DeusExMachina

    Topic Starter


    Starter

    • Experience: Experienced
    • OS: Windows 10
    Batch file for multi folders
    « on: March 20, 2019, 08:41:49 AM »
    So i want to make a .bat or .exe file on the desktop thats open up 6 Explorer windows arranged in a specific position with specific paths to folders on different drives.
    My screen is 3440*1440 and i would like to split them equally.
    I tried something like that:
    Script:

    @echo off
    start C:\Users\Sierr\Downloads
    start Z:\
    start S:\My Mod
    start S:\Z Work Flow
    start S:\Mod Organizer 32bit\mods\my mod\meshes\actors\character\meshes
    start S:\Mod Organizer 32bit\mods\my mod\textures\actors\character\textures


    But it opens only 1 folder per drive to the first folder that has a white space in it.
    Also i didnt even start on arranging them.
    Any ideas how i can achieve this.
    I thought of using powershell But i dont really know how this works.

    Powershell:

    $ie1 = new-object -commandsobject Explorer.Application $ie1.navigate("D:Downloads")
    $ie1.visible = $true
    $ie1.top = 10
    $ie1.width = 1146
    $ie1.height = 720
    $ie2 = new-object -comobject Explorer.Application $ie2.navigate("Z:")
    $ie2.visible = $true
    $ie2.top = 10
    $ie2.width = 1146
    $ie2.height = 720
    $ie3 = new-object -comobject Explorer.Application $ie3.navigate("S:Z Work Flow")
    $ie3.visible = $true
    $ie3.top = 10
    $ie3.width = 1146
    $ie3.height = 720
    $ie4 = new-object -comobject Explorer.Application $ie4.navigate("S:Modden/My Mod")
    $ie4.visible = $true
    $ie4.top = 10
    $ie4.width = 1146
    $ie4.height = 720
    $ie5 = new-object -comobject Explorer.Application $ie2.navigate("S:mod organizer/mods/my mod/meshes/actor/charakter/my mod/armor")
    $ie5.visible = $true
    $ie5.top = 10
    $ie5.width = 1146
    $ie5.height = 720
    $ie6 = new-object -comobject Explorer.Application $ie2.navigate("S:mod organizer/mods/my mod/textures/actor/charakter/my mod/armor")
    $ie6.visible = $true
    $ie6.top = 10
    $ie6.width = 1146
    $ie6.height = 720
    $ie7.Left = $ie1.UpperLeft + $ie3.UpperMiddle + $ie5. UpperRight $ie2. LowerLeft + $ie4. LowerMiddle $ie6. LowerRight

    Happy about any Help.

    Salmon Trout



      Genius

      Thanked: 961
      • Yes
    • Computer: Specs
    • Experience: Experienced
    • OS: Other
    Re: Batch file for multi folders
    « Reply #1 on: March 20, 2019, 10:32:41 AM »
    Very basic Windows knowledge: for files or folders with spaces in the name, use double quote marks, e.g.

    start "S:\My Mod" etc

    DeusExMachina

      Topic Starter


      Starter

      • Experience: Experienced
      • OS: Windows 10
      Re: Batch file for multi folders
      « Reply #2 on: March 20, 2019, 10:53:00 AM »
      Sure thats excatly whats i my script witout it it dosnt open any folder with it it behave like i describe it.

      But Thanks for the answer

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 998
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows XP
      Re: Batch file for multi folders
      « Reply #3 on: March 20, 2019, 11:17:48 AM »
      Do you already have a method for doing multiple instances of Explorer?
      Would you consider any method other than a batch script?
      Have you considered other kinds of GUI file managers?
      https://alternativeto.net/software/windows-explorer/
      Quote
      File Explorer, previously known as Windows Explorer, is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user interface for accessing the file systems. It is also the component of the operating system that presents many user interface items on the monitor such as the taskbar and desktop. Controlling the computer is possible without Windows Explorer running (for example, the File | Run command in... More Info
      There are over two-dozen software things that allow more visuals options...
      FreeCommander
      muCommander
      Explorer++
      MultiCommander
      Quote
      Perhaps the most famous and most used Explorer alternative, MultiCommander, is the application that does it all. Like Explorer++, it provides a portable version (created by the installable version). And, like both of the previously mentioned alternatives, MultiCommander gives you a tabbed interface. (Only the tabs appear on the bottom.)

      An' lots more.. Have you tried any of these o others? :)

      DeusExMachina

        Topic Starter


        Starter

        • Experience: Experienced
        • OS: Windows 10
        Re: Batch file for multi folders
        « Reply #4 on: March 20, 2019, 11:48:08 AM »
        Thanks very much i didnt realy found any Programm thats fits my needs But i will Look into that and try them all

        Simply said my main goal is to get fast to this 6 folders visual sortet after i restart my PC. preferable a 1 klick solution
        As it is now i have 6 links on the desktop.
        After I opened them i drag an drop them to there Position.
        Its not realy much work But its anoying if i do this multiple Times a day
        « Last Edit: March 20, 2019, 12:21:20 PM by DeusExMachina »

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 998
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows XP
        Re: Batch file for multi folders
        « Reply #5 on: March 20, 2019, 04:37:39 PM »
        Try Windows Manager. Not free.
        http://www.desksoft.com/WindowManager.htm
        Quote
        WindowManager helps you to improve your work flow by remembering and restoring the position and size of your programs and windows. Many programs don't remember their position and size between sessions and even Windows Explorer does not restore windows to their last position under Windows 7 or higher. This is where WindowManager steps in and makes sure your windows are placed exactly where you want them every time you open them. WindowManager even allows you to lock the position and size of any window, so that it will always open at the same spot no matter where you move it. The window handling is fully customizable and you can set up special rules for your favorite or most frequently used windows. You can also make WindowManager send keystrokes or mouse-clicks to a program when its window is opened,
        I have not tried it. It cost $10 and I have yet to pay this month's bills.

        Sidewinder



          Guru

          Thanked: 126
        • Experience: Familiar
        • OS: Windows 10
        Re: Batch file for multi folders
        « Reply #6 on: March 20, 2019, 10:51:21 PM »
        The batch solution offers no way to position the windows. The Powershell solution using Internet Explorer creates an object where you can position the windows. There are syntax errors in the new-object cmdlet but you have the right idea. Try using this syntax:

        Code: [Select]
        $ie1 = (New-Object -ComObject InternetExplorer.Application).Navigate("D:\Downloads")

        Another solution you can try would be to let Powershell position the windows automatically instead of you doing it manually:

        Code: [Select]
        $shell = New-Object -ComObject Shell.Application

        Invoke-Item -Path "D:\Downloads"
        Invoke-Item -Path "Z:\"
        Invoke-Item -Path "S:\Z Work Flow"
        Invoke-Item -Path "S:\Modden\My Mod"
        Invoke-Item -Path "S:\mod organizer\mods\my mod\meshes\actor\charakter\my mod\armor"
        Invoke-Item -Path "S:\mod organizer\mods\my mod\textures\actor\charakter\my mod\armor"
        Start-Sleep -Seconds 3

        $shell.TileVertically()

        Be aware this solution has a 3 second delay between the last window opened and positioning the windows. Also, the TileVertically method will tile all the open windows on your desktop.

        Good luck.  8)
        The true sign of intelligence is not knowledge but imagination.

        -- Albert Einstein

        DeusExMachina

          Topic Starter


          Starter

          • Experience: Experienced
          • OS: Windows 10
          Re: Batch file for multi folders
          « Reply #7 on: March 20, 2019, 11:09:31 PM »
          Thank you very much All you for your Great Help.
          I will test if i can make it work with Power Shell.