37

I want start my Cmder console in this route C:\xampp\htdocs, but I don't understand the syntax of 'Task parameters'. For example:

 `/icon "%CMDER_ROOT%\cmder.exe`"

Can anyone translate for this? C:\xampp\htdocs to -> /icon "%CMDER_ROOT%\cmder.exe"

So I could edit the config and place my custom folder: enter image description here

Thank you very much.

AddWeb Solution Pvt Ltd
  • 21,025
  • 5
  • 26
  • 57
Funny Frontend
  • 3,807
  • 11
  • 37
  • 56

9 Answers9

51

Go to Setup and Click on 'Startup dir...' button and specify startup directory. As you can see in example bellow startup directory is C:\DEV enter image description here

Vlad Bezden
  • 83,883
  • 25
  • 248
  • 179
  • 1
    As of version 171025, this is the solution, not to mention that it is a lot cleaner than the others suggested. – Luis Milanese Jan 10 '18 at 13:39
  • 1
    It should be noted that this solution has side effect that "cmder here" contextual menu does not work anymore. It will always open the startup directory you have set up. See [here](https://github.com/cmderdev/cmder/issues/1735) for more information. – jdhao Dec 24 '18 at 07:00
19

Change %USERPROFILE% to desired folder instead.

Maximus
  • 10,751
  • 8
  • 47
  • 65
6

Two ways:

  1. If you want to change the location PER task: do what "Maximus" said, change %USERPROFILE% to the specific location. The downside is that when creating a new console window, the "startup directory for new process" (see image below) will still be the default ConEmu installation directory.
  2. If you want to change the "Startup directory for new process:" location (from the default ConEmu installation directory to custom) when creating a new console:

enter image description here

Then create a shortcut for ConEmu / Cmder and change the "Start in:" attribute in the shortcut properties; like so:

enter image description here

Now simply use the shortcut instead of the exe. This has the benefit of changing the start location for ALL the tasks (all terminals you have setup).

Artash
  • 569
  • 6
  • 11
5

Instructions: Open Cmder -> Settings -> Tasks -> select {cmd::Cmder} (in my case). On the bottom (below textarea) you have button named "Startup dir...", and than select startup directory. Close cmder, and start again. That's it, enjoy

4

you can do it like this:

  1. edit <APP_DIR>/config/user-startup.cmd file,append a line(suppose dir is 'e:'):

    @cd /d "e:"

  2. restart cmder.

ref:

cmder config

zhu wang
  • 139
  • 5
4

For last version, you can do this:

  1. Open Cmder
  2. Presh: Windows + ALT + T enter image description here
  3. Push "Startup dir..." button
  4. Select Folder enter image description here
Javier
  • 1,975
  • 3
  • 24
  • 46
3

In the cmder/vendor/init.bat

Find this line

:: Set home path

And before it add

@cd /d "C:/YOUR_DIR_NAME/"


REF

Mostafa Nawara
  • 782
  • 9
  • 21
  • Vendor directory is not supposed to be edited by the end user and will be overwritten when user unpacks a new version of cmder. Use the config directory instead. See https://github.com/cmderdev/cmder#upgrading point 2 last bullet. "Editing files under [cmder_root]/vendor is not recommended since you will need to re-apply these changes after any upgrade. All user customizations should go in [cmder_root]/config folder." – user31389 Oct 29 '18 at 12:10
1

I added the line as in the screenshot. It is working for me.

enter image description here

T_T
  • 1,202
  • 16
  • 22
0

Edit the file: \CMDER_DIRECTORY\config\user-profile.cmd

cd C:\xampp\htdocs

On bellow example, I've changed the directory and created a rotine to start homestead.

:: use this file to run your own startup commands
:: use  in front of the command to prevent printing the command

:: uncomment this to have the ssh agent load when cmder starts
:: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"

:: uncomment this next two lines to use pageant as the ssh authentication agent
:: SET SSH_AUTH_SOCK=/tmp/.ssh-pageant-auth-sock
:: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-pageant.cmd"

:: you can add your plugins to the cmder path like so
:: set "PATH=%CMDER_ROOT%\vendor\whatever;%PATH%"

e:
cd ../../../../../Homestead

@echo off

:Ask
echo Would you like to start the Homestead?(Y/N)

set INPUT=
set /P INPUT=Yes(y) ou No(n): %=%
If /I "%INPUT%"=="y" goto yes 
If /I "%INPUT%"=="Y" goto yes 
If /I "%INPUT%"=="n" goto no

cls
echo Invalid option
echo - 
echo -
goto Ask

:yes
vagrant up
goto finalMessage

:no 
cls
goto finalMessage

:finalMessage
echo Your console is ready Mr. Chapela.
essemario
  • 11
  • 1