119

How do I change ConEmu settings such that always when I open it, it will start the cmd in a directory of my choosing instead of the default ConEmu folder?

1
  • An alt solution is to put some batch jobs somewhere in your path that just cd X:\Some\Long\Directory\Name for dirs that you commonly use. That way you're not limited to one dir, you're not limited to conemu, and you're not limited to just at startup.
    – Dax Fohl
    Mar 18, 2017 at 23:42

7 Answers 7

119

In addition to the answer by Bruno Pereira.

1) Another way - create new task with "cmd" in Commands (if not already created) and add following into "Gui args" field of task properties, and choose this task on startup page (radio "Specified named task")

/dir "FullPathToDir"

enter image description here enter image description here

2) One more example - run shell like (Startup -> Command line)

cmd "-cur_console:d:C:\Users\Maks"

enter image description here

11
  • the problem is that tasks don't run when I start conemu. Oct 2, 2012 at 9:57
  • 3
    Not true. You may choose any named task for startup on "Startup" page.
    – Maximus
    Oct 2, 2012 at 10:26
  • I get a command group is empty! error when I add the /dir PATH to task parameters Oct 2, 2012 at 10:40
  • 2
    I don't understand anything. Your app is excellent but you need to improve the english labels and the GUI usability. With Console2 I just need to go to Edit->Settings and edit the "Startup dir" field, that's all. I'm going to upvote the other answer (and if I could I'd downvote yours), in 2 secs I've changed the startup dir, with your steps is IMPOSSIBLE.
    – user201747
    Feb 23, 2013 at 14:38
  • 2
    Second approach is much better as it's simpler and doesn't open PowerShell! Apr 28, 2013 at 18:30
45

Just edit your startup shortcut adding the /Dir option as such:

ConEmu /Dir <path to desired directory>

Or on the shortcut properties change the Start in: path to something that fancies you

enter image description here

3
  • 3
    I don't know why the above one has more upvotes. This is the correct way to change the "default" start directory, as requested. This will apply to all tasks started in that ConEmu instance. Jun 8, 2014 at 23:33
  • Doesn't work for me at all though.
    – Xupicor
    Jul 19, 2015 at 16:10
  • Found the culprit - I was invoking bash with -login option, and that would always result in home directory. Now setting up directories with -cur_console or -new_console works fine.
    – Xupicor
    Jul 19, 2015 at 16:44
6

Open settings:

  1. Startup/Tasks
  2. Create new task
  3. In the first box put a name, e.g. Console
  4. In the third box copy this: C:\Windows\System32\cmd.exe -cur_console:d:D:/
  5. Go to Startup and select the task from the "specified named task" menu.

Restart

2
  • how do I write a folder path which contains space? Feb 23, 2013 at 15:39
  • have you tried to quote the path with " ?
    – user201747
    Feb 23, 2013 at 15:47
2

Another solution. Create a task and execute it when ConEmu starts.

Create task, e.g. go to folder D:\exampleDir

You can concatenate commands using &

Task creation - ConEmu

Execute task on startup:

Task on startup - ConEmu

1

In the task window, as in the top answer, use the following:

/dir %HOMEPATH%

instead of a direct path to your home folder.

1

The /dir thing didn't work for me with Powershell. I ended up putting the command as powershell.exe -noexit D:\MyDocs like so:

Powershell with default directory

and then set that to be the Startup task as already demonstrated in Maximus' answer:

No

0
1

Another real easy way that worked for me was to open up the Properties of the ConEmu shortcut (in Windows) and then edit the "Start in:" field as shown in the image below.

conemu shortcut properties enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .