Delete a list of items

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

Delete a list of items

Postby 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: 684
Joined: 20 Oct 2017 21:14

Re: Delete a list of items

Postby 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

Postby armsys » 18 Apr 2018 01:32

Hi Jupe,
It works. Thanks for your help.


Return to “Tips & Tricks, Questions & Answers”



Who is online

Users browsing this forum: No registered users and 4 guests