Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wrote this code in notepad to open the program files folder. It said that it couldn't find this directory. I even tried putting it in double quotes, but then it just opened a command prompt window and nothing else happened?

@echo off
start C:\Program Files\

OR

@echo off
start "C:\Program Files\"
Posted
Updated 19-Jul-14 1:18am
v2
Comments
[no name] 19-Jul-14 7:24am    
start %SystemRoot%\explorer.exe "folder path"

1 solution

You question doesn't say what you expected to happen but but I assume that want to open an Explorer window at "c:\program files".

I've found that Start command is either peculiar or just not documented corrected as it seems that the optional title field is not always optional!

My tip would be to try the following format with an empty title field:

Start "" "c:\program files"

Alan.
 
Share this answer
 
Comments
Nscoprio98 19-Jul-14 10:07am    
Thanks!! It worked :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900