help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to rename files to numbers in Eshell?


From: Felix E. Klee
Subject: Re: How to rename files to numbers in Eshell?
Date: Thu, 16 Sep 2021 18:07:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Nick Dokos <ndokos@gmail.com> writes:

> "Felix E. Klee" <felix.klee@inka.de> writes:
>
>> I just learned about [Eshell backticks][1].
>>
>> [1]: https://www.emacswiki.org/emacs/Eshell
>>
>
> The link should be https://www.emacswiki.org/emacs/EshellBackticks

Sorry, somehow this got chopped.

Latest iteration, still convoluted:

    $ setq my-files ${listify *.jpg}
    $ (let ((i 0))
        (mapcar (lambda (x)
                  (eshell/mv x (format "%d.jpg" (cl-incf i))))
                my-files))

Eshell is lacking the ease with which commands, functions, and
executables can be mixed.  If I wanted to use “/usr/bin/mv”, I guess I
would need to wrap the call in another function, and I don’t even know
which one.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]