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

List:       kde-devel
Subject:    Re: Recursive file copy
From:       Stephan Kulow <coolo () kde ! org>
Date:       2003-06-02 13:13:21
[Download RAW message or body]

On Monday 02 June 2003 14:51, Avi wrote:
> I'm trying to use KIO to emulate this kind of copy:
> 
>     cp -r /dir1/dir2/* /dir3/dir4/
> 
> Human languange: Copy all contents of /dir1/dir2/ inside /dir3/dir4/.
> 
> With current KIO::copy() I can only create dir2/ inside dir4/, which is
> not what I need.
> Any idea on how I can emulate the command above?
> 
well, write it as
list=`ls -1d /dir1/dir2/*`
for file in $list; do 
  cp -r $file /dir3/dir4/
done

That you can write in KIO (not with NetAccess though)

Greetings, Stephan
 
>> 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