Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Opening desktop folder from command line

15 Dec 2014   #1
jeth32

64-bit Windows 7 Home Premium
 
 
Opening desktop folder from command line

I have a desktop folder that contains all of the objects related to my internet access that is arraged in a specific way. When I click on it from the desktop, the arrangement is shown propeerly.

However, if I try to open it from the command line, the arrangement is lost and everything is displayed in a simple list view.

My goal is to eventually create a batch file that will be executed at the end of the boot process, to have this folder opened up automatically. But at present I just want to get the command syntax right and keep my arrangement when the folder is opened this way.


My System SpecsSystem Spec
.
15 Dec 2014   #2
Tookeri

Windows 7 Pro 32
 
 

Hi and welcome to Sevenforums!

Try this: after you've opened explorer from the command line, customize that window/folder the way you want it. Next time you open it from the command line you'll get that same customization.

Explorer seem to differentiate from "where" you're viewing the folder, meaning where that folder is selected in the left pane: favorites, libraries, computer C: etc

I've tested with explorer "%USERPROFILE%\desktop\test"
My System SpecsSystem Spec
15 Dec 2014   #3
jeth32

64-bit Windows 7 Home Premium
 
 
Opening desktop folder from command line

Thanks for speedy response.

I tried it and it worked fine and didn't mess up the original display (I haven't made the two arrangements the same yet).

I will have to remember that if I do make any changes to one, that I'll have to go and update other as well.

One odd result before I got your answer...If I entered: explorer \desktop\internet from the command prompt which comes up pointing to: Users\Dad, the folder that was opened was My Documents.

Joe
My System SpecsSystem Spec
.

15 Dec 2014   #4
Tookeri

Windows 7 Pro 32
 
 

It seems it opens My Documents if the parameter folder can't be found. I found another and better way so you don't have to maintain 2 arrangements:

On the desktop create a shortcut to the desktop folder. Then open that shortcut(.lnk file), example for a desktop folder named "test":
explorer "%USERPROFILE%\desktop\test - shortcut.lnk"

The shortcut was named test - shortcut and has the suffix .lnk For some reason that works. I don't know why. But trying to open with the path to the folder instead of the shortcut will cause explorer to open that folder under "Computer" in the left pane, which has it's separate customization settings. Weird!

It would be nice if someone could explain why it works this way
My System SpecsSystem Spec
Reply

 Opening desktop folder from command line




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Command Line - Help
Hi Guy's and Girls, Just first off I've never been too good with CMD and only an Apprentice in my company I work for. Now something I've wanted to do for awhile was to make the following but I don't necassirealy I know how to do this in one batch file: I would need a Batch file that is...
General Discussion
UAC bug with runas from command line?
Hi Folks, I am experiencing what I believe is a bug with UAC in Windows 7. I would like to see if anyone can recreate this issue and tell me if it is a bug or is working as expected. To recreate the issue: 1. Confirm the following local security policy setting is Enabled. Local Policies...
General Discussion
Disable/enable Desktop BG from Command Line
I currently have a Bat file (that I converted to exe called "kill start") set up that disables all my "extra" processes, and fires up a video game (i have one for each game), launches my Voip program of choice, and logs me in etc. That way I only have to hit one hot key and I'm good to go. Another...
Customization
command line to delete folder contents
What line in a batch file would delete the contents of C:\Users\MyName\AppData\Local\Microsoft\Windows\Temporary Internet Files\ ? del /F /S /Q /A "C:\Users\MyName\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*" fails, so does del...
Performance & Maintenance
How-to Open Any Folder From Command Line [cmd] ?
Example ProgramData or Any Hinden Folder. Sometime I Don't Need Check Show Hidden Files In Folder Option PS. Please Post All Command Line For Me. I Need All Command
General Discussion
Command Line
Is there a cmd.exe /switch for “run as administrator” ? Thanks-
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 12:07.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App