[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: (not only dolphin): Directory doesn't behave as Queue (FIFO)
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2013-09-16 15:21:56
Message-ID: CAExHGmRZybKetxva1CpVnFwtUvW5t3GhN0_2geOguFFzTe_row () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

On Mon, Sep 16, 2013 at 4:24 PM, Thomas Lübking
<thomas.luebking@gmail.com>wrote:

> On Montag, 16. September 2013 14:44:15 CEST, Frank Reininghaus wrote:
>
>  Moreover, implementing something like that is far less trivial than
>> one might think.
>>
>
> Yesno. The "trick" is to only pass leave paths to the KIO::copy() urls
> parameter and resolve dirs to leaves internally by present sort logics.
>
> It's however the far opposite of efficient - just assume there was a
> network invike - and an extreme cornercase, so one should have a dedicated
> tool (bash script or simple Qt application) to do it. Alternatively simply
> mkdir target/folder and copy the contents of the source directory instead
> of the directory (what will likely be sufficient in the described case to
> get a ripped folder into an mp3 player)
>
> For a huge singleton copy operation to get an entire collection down, 5-10
> lines bash at max should do.
>
> Sth. along
> dir="`realpath $1`"
> for file in `ls -1 --sort=BlaFoo` $1; do if [ -d "$file" ]; then $0
> "$dir/$file" "$2"; else cp "$file" "$2/$1/"; fi
>

If sorting by filename is sufficient Linux actually has a tool for that
called fatsort (http://fatsort.sourceforge.net/). It orders the entries in
the FAT table based on the filenames and allows to move directories before
or after the files as well.

Andreas

[Attachment #5 (text/html)]

<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep \
16, 2013 at 4:24 PM, Thomas Lübking <span dir="ltr">&lt;<a \
href="mailto:thomas.luebking@gmail.com" \
target="_blank">thomas.luebking@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
class="im">On Montag, 16. September 2013 14:44:15 CEST, Frank Reininghaus wrote:<br>

<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 Moreover, implementing something like that is far less trivial than<br>
one might think.<br>
</blockquote>
<br></div>
Yesno. The &quot;trick&quot; is to only pass leave paths to the KIO::copy() urls \
parameter and resolve dirs to leaves internally by present sort logics.<br> <br>
It&#39;s however the far opposite of efficient - just assume there was a network \
invike - and an extreme cornercase, so one should have a dedicated tool (bash script \
or simple Qt application) to do it. Alternatively simply mkdir target/folder and copy \
the contents of the source directory instead of the directory (what will likely be \
sufficient in the described case to get a ripped folder into an mp3 player)<br>

<br>
For a huge singleton copy operation to get an entire collection down, 5-10 lines bash \
at max should do.<br> <br>
Sth. along<br>
dir=&quot;`realpath $1`&quot;<br>
for file in `ls -1 --sort=BlaFoo` $1; do if [ -d &quot;$file&quot; ]; then $0 \
&quot;$dir/$file&quot; &quot;$2&quot;; else cp &quot;$file&quot; &quot;$2/$1/&quot;; \
fi<br></blockquote><div><br></div><div>If sorting by filename is sufficient Linux \
actually has a tool for that called fatsort (<a \
href="http://fatsort.sourceforge.net/">http://fatsort.sourceforge.net/</a>). It \
orders the entries in the FAT table based on the filenames and allows to move \
directories before or after the files as well.</div> \
<div><br></div><div>Andreas</div></div></div></div>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic