Deselect selected file if…

Hi,

:question: How can we deselect one or more selected item if these one match or don't match a pattern :question:

All I tried apply to the all lister instead of the selected item.

Help…

Do you mean interactively, or in a command as part of other operations?

No interaction required. It will be a part of a button code.

It's very simple in that case:

select *.txt deselect

Thanks it works as expected.

Here is an example that will avoid to send non media files to PotPlayer:

@nodeselect Select "Non video AND audio" FILTER DESELECT @runonce:"/Programmes\Multimedia\PotPlayer\PotPlayerMini64.exe" {filepath$}

A filter named "Non video AND audio" must be created and set such as:

[code]name match ~(*.(3g2|3ga|3gp|3gp2|3gpp|amv|asf|avi|bik|divx|dsa|dsm|dss|dsv|evo|f4v|flc|fli|flic|flv|hdmov|ifo|ivf|m1v|m2p|m2t|m2ts|m2v|m4v|mkv|mov|mp2v|mp4|mp4v|mpe|mpeg|mpg|mpv2|mpv4|mts|ogm|ogv|pva|ram|rec|rm|rmm|rmvb|rp|rt|smil|smk|swf|tp|trp|ts|vob|webm|wm|wmp|wmv))

AND name match ~(*.(aac|ac3|aif|aifc|aiff|alac|amr|aob|ape|apl|au|cda|dts|flac|fpl|m1a|m2a|m4a|m4b|m4r|mid|midi|mka|mlp|mp2|mp3|mpa|mpc|ofr|ofs|oga|ogg|opus|ra|rmi|snd|tak|tta|wav|wma|wv|xm))[/code]