Mar 15, 2007 #1 snowsmart IS-IT--Management Joined May 24, 2005 Messages 37 Location CA I want to copy files from A dir to B Dir, but I only need copy the ones that does not exist in the B dir. Please help thanks
I want to copy files from A dir to B Dir, but I only need copy the ones that does not exist in the B dir. Please help thanks
Mar 15, 2007 #2 dandan123 Technical User Joined Sep 9, 2005 Messages 505 Location US use rysync..u can download it from sunfreeware.com Upvote 0 Downvote
Mar 15, 2007 #3 sbrews Technical User Joined Jun 11, 2003 Messages 413 Location US Assuming you dont have 100s of files to move, this will do the trick: Code: cd /location/A for foo in `ls` do if [ ! -e /location/B/$foo ] then cp /location/A/$foo /location/B/ fi done Upvote 0 Downvote
Assuming you dont have 100s of files to move, this will do the trick: Code: cd /location/A for foo in `ls` do if [ ! -e /location/B/$foo ] then cp /location/A/$foo /location/B/ fi done
Mar 15, 2007 Thread starter #4 snowsmart IS-IT--Management Joined May 24, 2005 Messages 37 Location CA Thank you so much! Upvote 0 Downvote