Advertisement
Guest User

Untitled

a guest
May 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # create folders if they don't exist
  4. mkdir -p ./images
  5. mkdir -p ./music
  6. mkdir -p ./videos
  7.  
  8. # move files to their desired folders
  9. # silence errors if wildcard does not match any files
  10. mv *.mp3 ./music 2> /dev/null
  11. mv *.flac ./music 2> /dev/null
  12. mv *.jpg ./images 2> /dev/null
  13. mv *.png ./images 2> /dev/null
  14. mv *.mov ./videos 2> /dev/null
  15. mv *.avi ./videos 2> /dev/null
  16. rm *.log 2> /dev/null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement