Page 1 of 1

Path Wildcard Question

Posted: 04 May 2013 17:16
by arirish
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

Re: Path Wildcard Question

Posted: 04 May 2013 18:09
by admin
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.

Re: Path Wildcard Question

Posted: 05 May 2013 17:00
by arirish
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)?

Re: Path Wildcard Question

Posted: 06 May 2013 07:40
by highend
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().

Re: Path Wildcard Question

Posted: 06 May 2013 22:04
by arirish
Brilliant! Thanks a lot. Works a charm