none
How to open a folder location using a batch file? RRS feed

  • Question

  • I have tried both commands did not work for me, am i missing anything, please help? new in scripting.

    Thursday, October 29, 2015 9:27 PM

Answers

  • Don't post pictures. They are hard to read.

    You need to do this:


    start "" "%ProgramFiles%\Common Files\microsoft shared\Office14"
    

    or this (depending on if you want the 32-bit folder on 64-bit systems):


    start "" "%ProgramFiles(x86)%\Common Files\microsoft shared\Office14"
    

    Notice the " characters - you need all of them.


    -- Bill Stewart [Bill_Stewart]


    Thursday, October 29, 2015 10:06 PM
    Moderator

All replies

  • Don't post pictures. They are hard to read.

    You need to do this:


    start "" "%ProgramFiles%\Common Files\microsoft shared\Office14"
    

    or this (depending on if you want the 32-bit folder on 64-bit systems):


    start "" "%ProgramFiles(x86)%\Common Files\microsoft shared\Office14"
    

    Notice the " characters - you need all of them.


    -- Bill Stewart [Bill_Stewart]


    Thursday, October 29, 2015 10:06 PM
    Moderator
  • THis method works in batch, VBScript, PowerShell or any other language

    cd "c:\Program Files"
    Explorer .

    Or just this:

    explorer "c:\Program Files""


    \_(ツ)_/

    Thursday, October 29, 2015 11:23 PM
  • Thanks a lot Bill_Stewart, it is doing what i wanted to do?Now i have to accomplish next step, which is to open the folder according to what architecture it is for instance if it is x86 open x86 program file if not open just program files. If i get stuck i will get back to you, thanks again :)

    Thursday, October 29, 2015 11:32 PM
  • Thanks a lot Bill_Stewart, it is doing what i wanted to do?Now i have to accomplish next step, which is to open the folder according to what architecture it is for instance if it is x86 open x86 program file if not open just program files. If i get stuck i will get back to you, thanks again :)

    An x86 box does not have an x86 folder.  That folder only exists on a 64 bit OS.  I suspect you need to learn basic Windows architecture and how it is deployed.  Your question is a new Window user question.  Are you an ex-Unix or Mac guy?  I ran bot UNix and Mac before Windows was even released and even dummy me figured out Windows.

    Start with a basic book on modern Windows architecture and how it is implemented.


    \_(ツ)_/

    Thursday, October 29, 2015 11:39 PM
  • Appreciate your suggestion sir, thanks :)
    Friday, October 30, 2015 12:11 AM