osx - Script to rename files to parent folder, move renamed file and delete empty folder UNIX -
im trying create unix version of (to work on osx) script rename files parent folder, move renamed file , delete empty folder have no clue start.
if possible, able remove string @ origin of folder name. (the folders got off named "(blr) moviename","(sd) moviename" , "(hd) moviename" , remove tags @ beginning.
may please have help?
thanks in advance :)
the next might work, or give starting point:
ls -1 '(blr) '* '(sd) '* '(hd) '* | while read fff; nn=`echo $fff | sed 's/^[^ ]* //'` if [ -e $nn ]; echo "skipping $fff; $nn exists" else mv $fff $nn fi done
osx unix terminal command
No comments:
Post a Comment