help with my script
Posted: January 23rd, 2017, 3:22 pm
Hi gents.
I've never tried making a script in Bash before. So I could use some help.
I've made this script. The generel idea is to delete all files in the folder smaller than 200MB, then all files not mp4. The move the rest of the files to a folder called done. Afterwards I wan't to delete the old folder (part not done yet). But already now SAB says that it can not run this script. What am I missing? I assume it know that the complete folder is the main (default) folder.
#!/bin/bash
find . -name "*.*" -size -200MB - delete
find . -type f ! -name "*.mp4" - delete
mv "*.mp4" done/
all help and ideas are welcome.
I've never tried making a script in Bash before. So I could use some help.
I've made this script. The generel idea is to delete all files in the folder smaller than 200MB, then all files not mp4. The move the rest of the files to a folder called done. Afterwards I wan't to delete the old folder (part not done yet). But already now SAB says that it can not run this script. What am I missing? I assume it know that the complete folder is the main (default) folder.
#!/bin/bash
find . -name "*.*" -size -200MB - delete
find . -type f ! -name "*.mp4" - delete
mv "*.mp4" done/
all help and ideas are welcome.