Before I fully make the switch to Linux I’m looking for options to replace an old Windows program called SCRU. You set a folder to watch, and an output folder and it automatically copies specified extensions or extracts rar into the output folder.
I’m trying to figure out if there’s a way to do this in terminal and haven’t dug into scripts yet, just want to know of it’s possible.
The Linux way:
write a script: you can use the find command to find for example rars in a folder. find ~/thatfolder -iname ‘*.rar’ -exec uncompresscommand. Read ‘man find’ for specifics. Script’s first line is #!/bin/bash. Say ‘chmod u+x script’ to make it executable.
set up a systemd timer unit that calls a service unit that runs your script at intervals.
you can use something like for file in ~/thatfolder/* ; do sed trick that extracts the file extension and puts it in a variable ; case $variable in ; bunch of cases for different extensions. Variable $file will hold the source file name. Read up on bash scripting to figure it out.
Welcome to penguinland :D