Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open a folder with File explorer using .bat

Tags:

batch-file

What command should I use to open a specified path at the end of program.

start "c:\Yaya\yoyo\" 

Is not working

like image 768
Deb Avatar asked Nov 25 '13 20:11

Deb


People also ask

How do I open a folder in CMD using File Explorer?

To open File Explorer, press the Windows key and "E" at the same time. Navigate to the folder you want to open in Command Prompt. Using the panel on the left side of File Explorer, click the folder you want to open. Then click the folder to open it.

How do I force a File Explorer to open in a specific folder?

To open Windows File Explorer to a specific folder, create a shortcut to “%SYSTEMROOT%\explorer.exe /e,<folder>”, where “<folder>” is the folder of your choice.

How do I run a batch file in Windows Explorer?

Search for Command Prompt, right-click the top result, and select the Run as administrator option. Type the following command to run a Windows 10 batch file and press Enter: C:\PATH\TO\FOLDER\BATCH-NAME. bat.

How do I run a batch file from a specific folder?

Add Keyboard Shortcut to Run Batch File To make things a bit easier, you can add a keyboard shortcut to run the batch file. That way, you don’t have to specifically go to the desktop and click on the batch file. Pressing the keyboard shortcut from anywhere will execute the batch script to open the folders.

How to Open File Explorer from command prompt in Windows?

1. To open File Explorer application, you can simply type explorer command and press Enter to start explorer.exe from Command Prompt. 2. To open the current folder/directory File Explorer window, you can type start. command in Command Prompt window and press Enter.

How to open current folder/directory in File Explorer in Windows?

To open the current folder/directory File Explorer window, you can type start. command in Command Prompt window and press Enter. 3. To open the parent directory of the current folder, you can type start.. command, and press Enter. 4.

How to open bat file in Notepad?

Name the text file as “ OpenFolders.bat “. Make sure you replace the.txt extension with.bat. After creating the bat file, right-click on it and select “ Edit “. The bat file will be opened in the Notepad.


Video Answer


2 Answers

You can try like this:

%SystemRoot%\explorer.exe "c:\Yaya\yoyo\" 
like image 144
Rahul Tripathi Avatar answered Sep 18 '22 00:09

Rahul Tripathi


The start command needs blank quotes at the beginning, as it uses the first double quoted phrase as the "Window title"

start "" "c:\Yaya\yoyo\" 
like image 20
foxidrive Avatar answered Sep 20 '22 00:09

foxidrive