From: Alberto Luaces <aluaces@udc.es>
To: help-gnu-emacs@gnu.org
Subject: Re: Copying files with dired preserving structure
Date: Mon, 11 Jan 2016 10:24:26 +0100 [thread overview]
Message-ID: <874mekeaet.fsf@eps142.cdf.udc.es> (raw)
In-Reply-To: vritbn8u9g6s.fsf@web.de
Martin writes:
> Alberto Luaces writes:
>
>> Hi,
>>
>> I want to classify some files contained in a directory hierarchy into
>> several groups, depending on their content.
>>
>> So far I do a 'find-dired' to get a list of the available files and then
>> I mark each group by grepping into the files
>> (dired-mark-files-containing-regexp).
>>
>> The problem is that if I try now to move those files elsewhere, the
>> hierarchy is lost, and besides that, files with the same name are
>> overwritten.
>>
>> I have tried to "tar" the marked files to preserve the hierarchy, but
>> this approach is somewhat fragile, as I tend to use incorrect tar flags
>> and I risk corrupting my work when updating some of those "groups".
>>
>> I am looking for a way to move marked files to a different place
>> preserving the directory structure with dired.
>>
>> Thanks,
>
> Hi,
>
> you may want to use dired-do-(async-)shell-command with
> "cp ? --parents <target directory>".
Great! It does the trick!
Thank you, Martin.
--
Alberto
next prev parent reply other threads:[~2016-01-11 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1758.1452013450.843.help-gnu-emacs@gnu.org>
2016-01-10 5:06 ` Copying files with dired preserving structure Martin
2016-01-11 9:24 ` Alberto Luaces [this message]
2016-01-05 17:03 Alberto Luaces
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mekeaet.fsf@eps142.cdf.udc.es \
--to=aluaces@udc.es \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).