-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to start in a given directory #91
Comments
In the init.bat before :: Set home path add @cd /d "C:/YOUR_PREFERRED_FOLDER/" |
But how do I connect it to either: Supporting the current working directory would be good for use cases One idea I have in mind is to add a new variable "setdir" to cmder.bat, Later this should somehow be linked to init.bat to actually change the On 19/12/2013 12:48, Sean Downey wrote:
|
If you're using the latest version, you will have Cmder.exe instead of Cmder.bat. You can pass a path as an argument to start in that directory. |
Using the v1.1.2 release, I wasn't able to get cmder.exe to do anything with a path as an argument (I tried prepending with |
@bdukes I've tested on Win 8.1 x64 (not elevated) and Win 7 x64 (elevated) and it starts at the path that I provide. Can you verify that the line |
I've changed the configuration to start powershell instead of cmd by default, so it's not running |
That would explain it. I forgot about powershell since I don't ever use it. |
OK, this works, although it might still be a good idea to start by default in %CD%, as in Windows I found that the user's default folder is simply not as important as in *nix based systems. Calling cmder from any folder might make sense. But it definitely works with the first argument. |
Actually it probably makes the most sense to just statically link against the CRT. However, the 2013 DLLs do not have to be installed because they are included in the release. |
Sorry for first writing the dll issue it here, I've updated and moved that to a separate issue here: |
to add: [HKEY_CLASSES_ROOT\Directory\shell\Console] [HKEY_CLASSES_ROOT\Directory\shell\Console\command] [HKEY_CLASSES_ROOT\Directory\Background\shell\Console] [HKEY_CLASSES_ROOT\Directory\Background\shell\Console\command] to remove: [-HKEY_CLASSES_ROOT\Directory\shell\Console] [-HKEY_CLASSES_ROOT\Directory\Background\shell\Console] |
So what command line options need to be added in order to launch cmder.exe and have it start in a specified path? I'm using Total Commander too & added a link to the menu bar. I want to open cmder in the currently selected directory and haven't had any success passing different "command" or "parameter" options. Thanks. I tried this at a DOS prompt and it launches, but doesn't default to the "c:" directory:
|
@JamoCA that command works for me, but only if cmder not already running. If instance of cmder is running it will refuse to open new tab in that location. This is annoying as ConEmu doesn't have that problem! |
ok, I guess that makes sense, but it feels more like a limitation. I'm trying to keep cmder running in the tray. It'd be beneficial if there were a parameter to launch a specified path in a new cmder tab; kinda like clicking a URL opens a new tab in an already-running default browser. |
@JamoCA Hi, did you figure out how to open new folder as new tab? :) |
Strange. I removed the quotes from a simple path with no spaces (c:) and it works, but "c:" does not. If I pass a path that has spaces in the directory name (c:\program files), it won't work unless I specifically add quotes ("c:\program files"). Is this a bug? Paths should always work with quotes regardless of whether they have spaces or not, right? Or do I path names need to be parsed to determine if there are spaces and then manually add quotes? If I untoggle "Settings | Appearance | Single Instance Mode", individual cmder windows will open to the correct directories. If I enable "single instance mode", any new "/start" commands fail... a new cmder tab w/the specified start directory is not opened. If cmder is running in the tray with no tab open, using DOS to specify new start directory doesn't do anything... unless "single instance" is disabled. QUESTION: Is it possible to execute cmder.exe with a unique start path and have it open up in a single instance with a new tab? |
Please try on of the latest dev builds (in appveyor -> artifacts) |
I just downloaded the latest appveyor build (mini). Completely removed 1.2.9 and started with a fresh install. I changed to 'single instance mode' in settings (and that's the ONLY setting I change). Still not working properly for me :( I tried: Start the first instance using a shortcut on my taskbar (this opens in C:\Users\Remco). Then (from Win-R):
|
@remcoros I figure out that in my case actually I had setting under |
Thanks! Worked for me. When removed the %USERPROFILE% from Tasks in Settings of cmder. Then everytime I start cmder from Total Commander I am at current dir, which I started it from. |
thanks @kuncevic |
Addition on @ravindrapalli33 comment: And also make sure put/write file path after default cmder settings, as shown in attached image. |
Checkout my answer here: http://stackoverflow.com/questions/31933766/start-up-cmder-conemu-console-in-a-specific-folder/43836978#43836978 Basically, create a shortcut for ConEmu and change the "Start in:" attribute in the shortcut's properties. |
@saeed3e can‘t help anymore,It not work |
Here is my settings. This is for "Cmder Here", not for a fixed path. Using
In case of opening Cmder.exe from shortcuts, you can set the path in arg its property. Now it works for me, I hope this will help. |
This worked for me ...
|
Thanks, @froston . Worked for me as well. Edit: I'm using |
@froston THANK YOU! After changing that i can use the Working Example: Pls fix this Upstream |
Thank you, @taekout! I followed your instructions as you circled in your image. That worked perfectly. Thanks for taking the time to post screenshots, too! |
I tried all things here but unsuccessful. |
The |
go to set CMDER_START=%cd% |
@mhamri Why? Current cmder will open in the current dir or a command line specified dir IF your tasks are not using legacy config from older versions. You should never edit |
@arfmach what you say does not work works fine for me with current cmder versions IF your tasks are not using legacy config from older versions. |
I had to add backslashes to get it to work
|
CMDER_START variable is not available in the latest version. Has anyone succeeded with setting it up with the latest version to run cmder in the current folder, not the fixed one? |
Current Cmder will now open in the current folder or whatever folder you specify on the command line unless the task used to launch the session in Conemu specifies a folder to open in. If |
I am trying to integrate cmder into TotalCommander.
I have been using cmd.exe and msysgit integration in with custom keys (F8, F9) to start them in the current directories from Total Commander.
I would like to do it with cmder, but every time it starts in the user's homedir. Is there any way to make cmder start in a given dir?
The text was updated successfully, but these errors were encountered: