Can't Get Script To Delete Multiple Items

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Jeff Bellune
Posts: 284
Joined: 13 Dec 2007 12:55

Can't Get Script To Delete Multiple Items

Post by Jeff Bellune »

I have a simple (?) script that is supposed to delete everything in my system and user Temp folders, as well as the Recent folder. Here's what I started with:

Code: Select all

 MSG "User and System temporary files will be deleted. Click OK to continue." ,1,;
 DELETE 1,0,"%localappdata%\Temp\* | %windir%\Temp\* | %appdata%\Microsoft\Windows\Recent\*.lnk";
But it doesn't work. The %...% placeholders get parsed and resolved correctly, but nothing ever gets deleted.

During troubleshooting, I was only able to delete multiple items if they were listed by name explicitly. That just won't do. :)

I assume this is user error, but going by the XYWiki, I can't find out what the problem is. From the Wiki:

* You can use wildchars ( * ? ) if you want, to delete multiple items at once. You can even combine items with wildchars.

* When specifying more than one item, you can put spaces around the pipe separator, they will be stripped automatically.

Examples

delete 1, 0, ":list";
Sends all selected List items to the Recycle Bin without asking for confirmation

delete 0,,"D:\Some Folder";
Deletes folder D:\Some Folder (no Recycle Bin), asking a confirmation or not depending on the user option.

delete 0, 0, "E:\Folder\*.tmp | E:\Folder\*.bak";
Deletes directly (no Recycle Bin, no confirmation) all INI and BAK files in E:\Folder


However, the Scripting Commands Reference in the Help files doesn't mention wild card characters.

What am I doing wrong?

Thanks,
-Jeff

EDIT: UAC in Vista is turned completely off, and I am running under an administrator account.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Can't Get Script To Delete Multiple Items

Post by jacky »

hmmm.. right, you're not doing anything wrong, I didn't noticed but it seems wildchars do not work anymore ever since 7.80.0007 :?

Code: Select all

v7.80.0007 - 2008-11-16 15:13
    * SC delete: Now, any non-existing items passed in the [itemlist]
      argument will be simply ignored. No more error message.
Proud XYplorer Fanatic

Jeff Bellune
Posts: 284
Joined: 13 Dec 2007 12:55

Re: Can't Get Script To Delete Multiple Items

Post by Jeff Bellune »

What do you think: Bug Report or Feature Request?

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Can't Get Script To Delete Multiple Items

Post by jacky »

Jeff Bellune wrote:What do you think: Bug Report or Feature Request?
Given that it worked before, I say bug report. I'm assuming XY does some kind of basic check to see whether or not each item exists (removing those who don't), and fails when there's a wildchars instead of just skipping them - especially since a delete of "d:\folder\*.tmp" didn't trigger any errors when there were no such items.
Proud XYplorer Fanatic

Jeff Bellune
Posts: 284
Joined: 13 Dec 2007 12:55

Re: Can't Get Script To Delete Multiple Items

Post by Jeff Bellune »

Thanks, jacky. I started a new topic with the same name in the Bug Reports section, and I linked to this topic.

-Jeff

admin
Site Admin
Posts: 66303
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Can't Get Script To Delete Multiple Items

Post by admin »

jacky wrote:hmmm.. right, you're not doing anything wrong, I didn't noticed but it seems wildchars do not work anymore ever since 7.80.0007 :?

Code: Select all

v7.80.0007 - 2008-11-16 15:13
    * SC delete: Now, any non-existing items passed in the [itemlist]
      argument will be simply ignored. No more error message.
Good analysis! :D

Post Reply