0

In folder I have 5 subfolders:

drawable-hdpi\
drawable-mdpi\
drawable-xhdpi\
drawable-xxhdpi\
drawable-xxxhdpi\

In all of this 5 subfolders I have files with same names:

ic_m_brands_gray.png
ic_m_brands_orange.png
ic_m_favourites_gray.png
ic_m_favourites_orange.png
ic_m_home_gray.png

I need to rename all of this files in ALL (five) subfolders.

So I do this by dired mode and package iedit

My steps:

  1. Go to folder drawable-hdpi

  2. C-x C-q toogle edit mode

  3. Go to file with same suffix (gray)

  4. Select region then iedit-mode

  5. Rename to desire suffix

  6. Press C-c C-c

  7. Repeat steps 1-6 for another 4 subfolders.

Here example:

step1

step2

step3

OK. It's work. Fine.

But I think it's to slow (too many steps).

Is it possible to show ALL files (from 5 subfolders) in ONE buffer? And then in this ONE buffer rename all files?

It's will be a good solution.

1

You can use dired-maybe-insert-subdir (by default bound to i in Dired), on each folder, before using steps 2-5 in your question. See Subdirectories in Dired in the manual.

I myself use dired-subtree from MELPA (it is a part of Dired Hacks by Fuco1). You can then use dired-subtree-toggle, which I think is a nicer interface.

  • Yes!!! Emacs is COOL!!! – a_subscriber Nov 10 '17 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.