.
I have tried every combination of Sel, Selfilter, and switches and can't see how to do this in a script. I also find only one thread previously, and it doesn't go quite far enough. So I think I'll be putting this on the Wish list. But XY has so much power that I could be missing a reasonably simple method.
What I want to do is select all files except .PPP files - and no folders. I know how to select everything except .PPP files (selfilter followed by sel inversion). But that leaves folders selected.
My only remaining idea is some regex pattern extraction into a variable, then use that in selfilter... but I know that regex to find 'lack of material' is not standard and very complex when it does work.
Again, after all this time it seems like someone would have nailed this, but I haven't run across it.
Thanks for any help.
How to select all except one type of file?
Re: How to select all except one type of file?
Select Edit->Select->Selection Filter.
try this filter:!*.PPP means, as you can tell, everything except *.PPP files and the *: means select files only (no folders)
I learned about selection filters only a few days ago.
try this filter:
Code: Select all
*:!*.PPP
I learned about selection filters only a few days ago.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: How to select all except one type of file?
.
Thank you, Sammay, that does work as you describe using menu commands, but not in a script. Using Try Script,
selfilter "*:!*.PPP"
does nothing.
Nor does 'sel f' (to select all files) then selfilters trying to drop all except .PPP.
Further ideas appreciated!
Thank you, Sammay, that does work as you describe using menu commands, but not in a script. Using Try Script,
selfilter "*:!*.PPP"
does nothing.
Nor does 'sel f' (to select all files) then selfilters trying to drop all except .PPP.
Further ideas appreciated!
Re: How to select all except one type of file?
Don't know if I get you wrong but selecting all files with one extension exception is pretty easy in a script:
Code: Select all
selectitems formatlist(listfolder(, , 1), "f", , "!*.ppp");
One of my scripts helped you out? Please donate via Paypal
Re: How to select all except one type of file?
Thanks highend, that works perfectly.
I'm still at a more basic level and don't yet know which tool to try first.
This would be a good example to add to the Help, I think.
BTW, any idea why selfilter "*:!*.PPP" didn't work in a script? Should it have? It looked right and worked when entered manually.
I'm still at a more basic level and don't yet know which tool to try first.
This would be a good example to add to the Help, I think.
BTW, any idea why selfilter "*:!*.PPP" didn't work in a script? Should it have? It looked right and worked when entered manually.
Re: How to select all except one type of file?
Thought you were manual-browsingPapoulka wrote:Thank you, Sammay, that does work as you describe using menu commands, but not in a script.
Probably because the *: part is only valid for Selection Filters...Papoulka wrote:any idea why selfilter "*:!*.PPP" didn't work in a script?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: How to select all except one type of file?
And the help file doesn't say anything about selfilter being able to invert the selection via "!".
doesn't work for me (at all) in the address bar.
Code: Select all
selfilter "*:!*.PPP"
One of my scripts helped you out? Please donate via Paypal
Re: How to select all except one type of file?
.
No, the Help doesn't say Selfilter will use the "!". I was hoping it would work anyway. It was interesting that when "*:!*.PPP" is entered manually via Edit |Select | Selection Filter (without quotes), it does work. When used as a Selfilter argument, it does not. It would be nice, and seem consistent, if it did.
Essentially, since all except the "!" do work in Selfilter, I thought perhaps that was an inadvertent omission.
Thanks for the help.
No, the Help doesn't say Selfilter will use the "!". I was hoping it would work anyway. It was interesting that when "*:!*.PPP" is entered manually via Edit |Select | Selection Filter (without quotes), it does work. When used as a Selfilter argument, it does not. It would be nice, and seem consistent, if it did.
Essentially, since all except the "!" do work in Selfilter, I thought perhaps that was an inadvertent omission.
Thanks for the help.
Re: How to select all except one type of file?
how to select all files except all the folders?
-
- Site Admin
- Posts: 60538
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: How to select all except one type of file?
Edit | Select | Select All Files (Ctrl+Shift+Alt+M)
FAQ | XY News RSS | XY Twitter
Re: How to select all except one type of file?
thanks a lot.