Button macro to select all but some specific files/folders?

Hi,

Is it possible to write a button macro that will select all but some specific files and folders? In other words, I want to do the equivalent of a "Select All", then deselect the files and folders I want excluded.

I do this regularly after I run my PC's System Update utility; it leaves temporary files and folders around and I want to be able to select all files and folders except, for example, "Folder 1", "Folder 2", "File1.ext", and "File2.ext".

Is this possible? If so, I'm obviously not a macro expert, so can you provide some guidance?

My objective would be to delete all the files and folders I have selected.

Thanks!

Play around with a pattern match like:

select ~(folder1|folder2|file1.ext|file2.ext)

However, I couldn't for the life of me get it to work with spaces in the name of each "don't match" item... I tried various double-quote placements to no avail. But this is a start I suppose as it works with items without spaces. Shouldn't be too hard to make work with spaces...

Just put the whole pattern in quotes to handle spaces, same with any other argument:

select "~(folder 1|folder 2|file 1.ext|file 2.ext)"

Great! Thanks!!! :thumbsup:

[quote="leo"]Just put the whole pattern in quotes to handle spaces, same with any other argument:

select "~(folder 1|folder 2|file 1.ext|file 2.ext)"

Crap... I had tried that (or so I thought)... but I think it was in the midst of that weird off-screen toolbar menu item issue I reported, so I guess it wasn't actually in effect when I "thought" I tired it. Woopsy!