Quickfilters, selections and copying

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.

  1. I would like to read and store the state of the QUICKFILTER so that I can restore it at the end of the process.
  2. I can't work out how to turn the QUICKFILTER off entirely, so I am using a wildcard ".". Is there a better way?
  3. 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.
  4. 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:

<?xml version="1.0"?> CopySimilar When "abc_l.png" selected, select "abc_m.png" and copy #smartfavorites @nodeselect SET QUICKFILTER "*.*" CLIPBOARD COPYNAMES=nopaths REGEXP "(.*)(_l).png" "\1_m.png" Select "{clip}" EXACT COPY Select ALLFILES DESELECT

Any pointers would be welcome.

The docs explain how to clear the quickfilter and how to then restore it to the previously used filter:


But you'll still run into a problem here because {clip} is evaluated at the start of the command, not when the line it is on is reached. You can't put filenames in the clipboard and then use {clip} to access them from the same command.

If it was me, I'd probably use some VBScript or similar (in an external script file that the command runs and passes the list of files to) to convert the names and then run the Opus select command (which the script can run via dopusrt.exe). That avoids trashing your clipboard when you use the button, too.

Leo, thanks for the prompt response. It seems to be more involved than I thought. I may take a look at a VBScript solution at some point.

Dan