Does this do what you want?
dur_max=3600 # or whatever you want the max to be
# find the appropriate files and deal with them one at a time
find "$findpath" -maxdepth 2 -type f -iname '*.mp4' -print |
while read file ; do
# read duration
duration="$(ffprobe -v quiet -print_format compact=print_section=0:nokey=1:escape=csv -show_entries format=duration "$file")"
# trim off the decimals; bash doesn't do floats
if [[ $duration -gt $dur_min ]] && [[ $duration -lt $dur_max ]] ; then
echo "$file is $duration seconds long (rounded down)"
# do whatever you want, mv, ln, etc.
Note I used
iname rather than
name to make it case insensitive (*.MP4, etc.)
Also, I'm using ffprobe not avprobe (which I don't have), but you have ffmpeg tagged, so I guess that's OK?