Short summary: How can I store the state of the quickfilter, clear it, select and copy some files, then return quickfilter to its previous condition after running a script, then deselect files?
Explanation: When I prepare image files for my website, I routinely make large and medium png files. Large files end in "_l.png" and medium files end in "_m.png". I usually filter the lister so that I do not see medium files (SET QUICKFILTER "~(_m)*") as I don't want to view these when flipping through the images in a lister. However, once I have established which pair of files I want to copy to the FTP site in other side of the dual lister, it is tedious to select the large ("_l") file, clear the quickfilter, hunt around for the medium ("_m") file in a folder that may have several hundred items, then copy both files, then return the lister to its previous filtered state.
I would like to do this with a button but I have several related problems.
- I would like to read and store the state of the QUICKFILTER so that I can restore it at the end of the process.
- I can't work out how to turn the QUICKFILTER off entirely, so I am using a wildcard ".". Is there a better way?
- At the end of the process I would like to deselect everything, irrespective of filters, so that I don't accidentally include them in the next (future) copy.
- Sometimes the button selects similar but not identical files for reasons I don't understand and cannot consistently reproduce.
So far I have this:
@nodeselect
SET QUICKFILTER "*.*"
CLIPBOARD COPYNAMES=nopaths REGEXP "(.*)(_l).png" "\1_m.png"
Select "{clip}" EXACT
COPY
Select ALLFILES DESELECT
XML follows:
Any pointers would be welcome.