Re: Marking Files for Transfer



That can be done most efficiently with a shell script.  You specify the 
search criteria with a foreach loop and do operations on those files 
based on that search criteria.  For example first locate sieger 
>sieger.fil <cr> Then you could edit sieger.fil with ex and do something 
like %s/^/cp / <cr> which would put cp in front of every one of those 
file names in the sieger.fil.  Then %s/$/ /home/rayj/music/sieger/ <cr>. 
 Then save that to sieger.1 and get out of there.  Next edit sieger.fil 
with ex  again and do something like %s/^/rm / <cr> then save that as 
sieger.2 and exit sieger.fil.  next cat sieger.1 sieger.2 >sieger.3 and 
put the line that turns it into a shell script at the top of sieger.3 
and make it executable and run sieger.3 and that should take care of 
that artist.  You could also run sieger.1 as a separate script then 
check to see if all files made it to their new destination and then run 
sieger.2 once you confirmed the first finding.  That way nothing gets 
removed until after you verify the copy to new location.

On Thu, 22 Sep 2011, RiverWind wrote:

> Hi Folks,
> 
> When wanting to move files from one directory to another, is there a way to do
> so selectively, say in batches. You see, my "Download" directory is full of CD
> tracks of music from different artists. I am wanting to seperate the tracks
> into their respective directories. CTRL X will move files, and CTRL-c will
> copy them, but this is all individually.
> 
> Thanks,
> Riv
> 
> Feel free to visit my website and my blog and learn more about me
> and what I stand for.
> My Website @ http://riverwind.shellworld.net
> My Blog http://windraven13.livejournal.com/
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list redhat com
> https://www.redhat.com/mailman/listinfo/blinux-list
> 
> 

Jude <jdashiel shellworld net>
"I love the Pope, I love seeing him in his Pope-Mobile, his three feet
of bullet proof plexi-glass. That's faith in action folks! You know he's
got God on his side."
~ Bill Hicks


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]