Hi,

On Mon, Sep 16, 2013 at 4:24 PM, Thomas Lübking
<thomas.luebk...@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
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to