I'm trying to create a button that, when clicked, will find and delete all files with a certain phrase in the filename. I'm at:
delete 0, 1, "I:\curproject\*defunct*.*";
which works, but only for the folder 'curproject' and not for its subfolders. What do I need to add to include the subfolders (I tried "I:\curproject\*\*defunct*.*" with no luck)?
Thanks
Path Wildcard Question
-
admin
- Site Admin
- Posts: 66375
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Path Wildcard Question
The wildcard functionality here is by Windows itself (XYplorer just passes the pattern), so no chance this way. But scripting should offer other, slightly more involded, ways to achieve what you want.
FAQ | XY News RSS | XY X
-
arirish
- Posts: 93
- Joined: 13 May 2008 13:52
Re: Path Wildcard Question
Alternate idea, then: I've created a search template to find the files I want. Can I invoke that via scripting and then delete all found files (preferably in the background)?
-
highend
- Posts: 14956
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Path Wildcard Question
You can. Only (small) disadvantage: You can't use it "fully invisible" (because you'll always have at least the search results)...
Look for loadsearch().
Look for loadsearch().
One of my scripts helped you out? Please donate via Paypal
-
arirish
- Posts: 93
- Joined: 13 May 2008 13:52
Re: Path Wildcard Question
Brilliant! Thanks a lot. Works a charm
XYplorer Beta Club