<div dir="auto">Thanks Fabi, et all,<div dir="auto"><br></div><div dir="auto">I will follow up with your suggestion using ssh for renaming the directories after rsync. I appreciate the help.</div><div dir="auto"><br></div><div dir="auto">Freddie </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 25, 2019, 4:00 AM  <<a href="mailto:rsync-request@lists.samba.org">rsync-request@lists.samba.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send rsync mailing list submissions to<br>
        <a href="mailto:rsync@lists.samba.org" target="_blank" rel="noreferrer">rsync@lists.samba.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.samba.org/mailman/listinfo/rsync" rel="noreferrer noreferrer" target="_blank">https://lists.samba.org/mailman/listinfo/rsync</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:rsync-request@lists.samba.org" target="_blank" rel="noreferrer">rsync-request@lists.samba.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:rsync-owner@lists.samba.org" target="_blank" rel="noreferrer">rsync-owner@lists.samba.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of rsync digest..."<br>
To unsubscribe or change options: <a href="https://lists.samba.org/mailman/listinfo/rsync" rel="noreferrer noreferrer" target="_blank">https://lists.samba.org/mailman/listinfo/rsync</a><br>
Before posting, read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html" rel="noreferrer noreferrer" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br>
<br>
---------------------------------------<br>
Today's Topics:<br>
<br>
   1. Re: Removing folder at destination (raf)<br>
<br><br><br>---------- Forwarded message ----------<br>From: raf <<a href="mailto:rsync@raf.org" target="_blank" rel="noreferrer">rsync@raf.org</a>><br>To: <a href="mailto:rsync@lists.samba.org" target="_blank" rel="noreferrer">rsync@lists.samba.org</a><br>Cc: <br>Bcc: <br>Date: Mon, 25 Nov 2019 13:43:33 +1100<br>Subject: Re: Removing folder at destination<br>Fabian Cenedese via rsync wrote:<br>
<br>
> >Why not exclude 2_ASSETS from the first run, and then do a second run to<br>
> >rsync the _contents_ of 2_ASSETS to the target 01_us_eng directory?<br>
> ><br>
> >Add /01_us_eng/2_ASSETS/ to the exclude.txt file.<br>
> ><br>
> >rsync -rvz --exclude-from=exclude.txt source destination<br>
> >rsync -rvz source/01_us_eng/2_ASSETS/ destination/01_us_eng/<br>
> ><br>
> >(perhaps add some variation of the exclude.txt file if you're excluding<br>
> >stuff under the 2_ASSETS directory)<br>
> ><br>
> >> My humble question to <a href="http://samba.org" rel="noreferrer noreferrer" target="_blank">samba.org</a> is this, can I add an rsync command to move<br>
> >> folders 3 and 4 into 01... and delete the 2_ASSETS folder so I dont have to<br>
> >> manually do this 200 times each day?<br>
> ><br>
> >You can't use rsync to perform remote rename operations, which is what<br>
> >you're essentially asking for.<br>
> <br>
> You can execute remote commands using ssh/rsh. If the names<br>
> stay the same then you can add the rename commands to a script<br>
> file being executed after the rsync run.<br>
> <br>
> bye  Fabi<br>
<br>
But if you do that, subsequent uses of rsync won't work<br>
any more efficiently than the first one did. It would<br>
have to re-copy the files that have not kept their<br>
original names. That's probably why rsync doesn't do<br>
renaming operations.<br>
<br>
You might be better off renaming or moving things at<br>
the source and rsyncing that. If that's not an option,<br>
and the source and destination really need to differ,<br>
you could construct the desired directory layout using<br>
symlinks to the originals, and rsync the alternate<br>
symlink version.<br>
<br>
I've done a similar thing when rsyncing files<br>
originally from a macOS host whose names contained<br>
colon characters (representing forward slashes) to a<br>
Windows host where colon characters aren't allowed in<br>
file names. A script would construct the<br>
Windows-friendly view of the files, then rsync that,<br>
then delete the Windows-friendly view afterwards.<br>
<br>
That won't work if you need to rsync any symlinks as<br>
symlinks but otherwise, it should be OK.<br>
<br>
cheers,<br>
raf<br>
<br>
<br>
<br>
_______________________________________<br>
Before posting, read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html" rel="noreferrer noreferrer" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br>
<br>
rsync mailing list<br>
<a href="mailto:rsync@lists.samba.org" target="_blank" rel="noreferrer">rsync@lists.samba.org</a><br>
<a href="https://lists.samba.org/mailman/listinfo/rsync" rel="noreferrer noreferrer" target="_blank">https://lists.samba.org/mailman/listinfo/rsync</a><br>
</blockquote></div>