"Instead having 9,999 functions which do the same thing with slightly different values, just have your function take parameters."
- Well it's a good point and i would do that If I only wanted to do this action on only 1 particular kind of file but having "9.999 functions" allows me to run them all at once. If i don't want to use one I simply comment it. If I have to modify the subdirectory ($VAR) I simply edit the function.
Good point for the $PATH tho hum.. *hides
switched it to $DIR.
"That code couldn't possibly work. '$FILENAME' in single quotes won't expand. 'FILENAME*' won't expand properly either."
- Indeed it's under double quotes in my script, wrote it back while writing this post, editing previous post..
"Why do you have -type d in one and not in the other?"
- To find my "$FILENAME*" directory and delete it. The name of the directory is basicly the same as the filename. It's set in each function.