[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete-file using wildcard
From: |
Jambunathan K |
Subject: |
Re: delete-file using wildcard |
Date: |
Sat, 29 Oct 2011 13:42:43 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (windows-nt) |
May be you should use dired.
1. C-x C-f ~/tmp RET
2. * % \.pdf$
3. t
4. k
5. t
6. D
1 => visit directory in dired
2 => mark all pdf files. Uses emacs style regexps
3 => toggle mark. this marks all non-pdf files
4 => kill mark. Removes the display of files marked in 3
5 => toggle mark. this marks all pdf files. This shows (just) the files that you
will be operating upon
6 => Delete the chosen files
Steps 3,4 and 5 are optional.
Use with caution.
> I have a question about Emacs Lisp, which I believe is simple enough
> for most of you.
>
>
> I would like to delete files in a directory.
> When doing so with Linux command, we usually do,
>
>> rm *
>
> at that directory.
>
> the wildcard command does not seem work similarly in Emacs Lisp.
>
> (delete-file (subseq (file-expand-wildcards "~/Desktop/*") -1))
>
> doesn't work.
>
> Could anyone help me out?
>
> soichi
>
>
--