in Emacs

[Emacs] Create a directory within emacs.

* to create the directory dir/to/create, type:
[code]
M-x make-directory RET dir/to/create RET[/code]

* to create directories dir/parent1/node and dir/parent2/node, type:
[code]
M-! mkdir -p dir/parent{1,2}/node RET[/code]
It assumes that Emacs’s inferior shell is bash.

* or in a Dired mode

+
It doesn’t create nonexistent parent directories.

Example:

[code]
C-x d *.py RET ; shows python source files in the CWD in `Dired` mode
+ test RET ; create `test` directory in the CWD[/code]
CWD stands for Current Working Directory.

* or just create a new file with non-existing parent directories using C-x C-f and type:
[code]
M-x make-directory RET RET[/code]

Write a Comment

Comment