Guide 7 - Images, videos

Since version 0.8.9, Perun2 supports detection of two common classes of files: images and videos. It uses a huge database of file formats, so if something is a picture, it will definitely be identified. There are four new variables we can use in expressions.

select images;
select videos;
select recursiveImages;
select recursiveVideos;

These classes of files have unique attributes. Width and height for both images and videos. Duration only for videos.

open images
  order by width * height desc
  limit 1
with photoshop
move recursiveVideos
  where width = 1920
    and height = 1080
    and duration >= 20 minutes
to 'c:/folder/with/movies'

Special attributes can be also applied generally to files.

delete '*.mp4'
  where duration < 5 seconds

Booleans isImage and isVideo are useful for more refined logic expressions.

hide files
  where not isVideo