Advertisement
v1ral_ITS

Find ALL Files Of Any File EXT And Copy[or]Move To Any DEST

Apr 21st, 2018
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.25 KB | None | 0 0
  1. #!/bin/bash
  2. # ImPerial TeK Solutions (ITS)
  3. # Copyright (c) 2018 v1ral <ImPerialTeKSolutions@outlook.com>
  4.  
  5. S='sudo'
  6. CMD='find'
  7. C='cp'
  8. M='mv'
  9. ME=$USER
  10. TYPE=$(zenity --title "File Type" --entry  --text "What File Type Ext. Are We Looking For? " )
  11. DEST=$(zenity --title "Destination Folder" --entry --text "What Will The Destination Folder Be, <Only Folders In Your Home Directory user= "$ME" >? "  )
  12. $TYPE; $DEST
  13.  
  14. #########
  15. # START #
  16. #########
  17.  
  18. echo -e "AVALIABLE_OPTIONS: \n1) To Find And <COPY> All The <$TYPE> Files To <$DEST> , Choose This Option. \n2) To Find And <MOVE> All The <$TYPE> Files To <$DEST> , Choose This Option. "
  19. read OPTS
  20. case $OPTS in
  21.     1) $S $CMD / -iname '$TYPE' -exec $C {} /home/$ME/$DEST/ \; ;;
  22.     2) $S $CMD / -iname '$TYPE' -exec $M {} /home/$ME/$DEST/ \; ;; 
  23. esac
  24. echo -e $gray"OPTIONS: \n1) Send Us Feedback \nOr Inquire About A Script Made For You! \n2) No Thanks, Im Done! "
  25. read nn
  26. case $nn in
  27.     1) read -p "Hit [E]nter & Copy Email, Hit [E]nter After To Bring Up Your Browser"; read -p "ImPerialTeKSolutions@outlook.com"; sleep 3; x-www-browser www.gmail.com;;
  28.     2) echo "$orange If You Ever Change Your Mind \nPlease Feel Free To Email Us Anytime @ \nImPerialTeKSolutions@outlook.com, THANKS! "
  29. esac
  30.  
  31. #######
  32. # END #
  33. #######
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement