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 » 18 Apr 2018 01:18

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: 903
Joined: 20 Oct 2017 21:14
Location: 1809 x64

Re: Delete a list of items

Post by jupe » 18 Apr 2018 01:23

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 » 18 Apr 2018 01:32

Hi Jupe,
It works. Thanks for your help.

Post Reply