Delete a list of items

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

Delete a list of items

Post by armsys »

The following code doesn't work.

Code: Select all

// Delete a list of items
  $list = quicksearch(".bak","C:\");
  text $list;
  delete 1,1,$list;

How to delete a list of files?

jupe
Posts: 2790
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Delete a list of items

Post by jupe »

If you look at the help for the delete command you will see that it needs the items to be | separated, so it should work like this instead:

Code: Select all

  $list = quicksearch(".bak","C:\", "|");
  text $list;
  delete 1,1,$list;

armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

Re: Delete a list of items

Post by armsys »

Hi Jupe,
It works. Thanks for your help.

Post Reply