Community Discussions and Support
The Recent Search Results List

I know that I have asked this question before, so I apologise beforehand to people like Brian Fluent. Has anybody written a routine to clear out the Recent Search Results list? Through bad management I have allowed my list to get out of hand, and do not really want to have to go through it deleting each line individually. I am not proficient enough to tackle this task myself, producing the routine that is (classic example of a mis-placed epithet, sorry!).


David Tarbox-Cooper


I know that I have asked this question before, so I apologise beforehand to people like Brian Fluent. Has anybody written a routine to clear out the Recent Search Results list? Through bad management I have allowed my list to get out of hand, and do not really want to have to go through it deleting each line individually. I am not proficient enough to tackle this task myself, producing the routine that is (classic example of a mis-placed epithet, sorry!). David Tarbox-Cooper

David,


Search results folders are Link folders in Pegasus Mail. It is possible, but rare, for there to be any Link folders other than search results folders. The filename of Link folders are in the form of LNK?????.PNL.


Based on that...


  • Close Pegasus Mail.
  • Use a file explorer to navigate to your mailbox directory.
  • Sort the file list by filename.
  • Select all files with a filename in the form of LNK?????.PNL and move them to a temporary location.
  • Start Pegasus Mail and confirm all is well in your folder list.
  • You can then delete the link folder files in the temporary location.

Manipulating Pegasus Mail files outside of Pegasus Mail is not something I recommend. I tested this with a single search results Link folder but please be clear that you are doing this at your own risk. Make a backup first.


David, Search results folders are Link folders in Pegasus Mail. It is possible, but rare, for there to be any Link folders other than search results folders. The filename of Link folders are in the form of LNK?????.PNL. Based on that... - Close Pegasus Mail. - Use a file explorer to navigate to your mailbox directory. - Sort the file list by filename. - Select all files with a filename in the form of LNK?????.PNL and move them to a temporary location. - Start Pegasus Mail and confirm all is well in your folder list. - You can then delete the link folder files in the temporary location. Manipulating Pegasus Mail files outside of Pegasus Mail is not something I recommend. I tested this with a single search results Link folder but please be clear that you are doing this at your own risk. Make a backup first.

First, Did a quick search and found something that might do what you want, but would be very careful to make sure it works correctly. Don't have a windows machine handy so can't test it at moment.
Found this, but it is to delete all files older than 30 days in the path, so that would not be what one wants.
ForFiles /p "C:\My Folder" /s /d -30 /c "cmd /c del @file"

Another page gave more info on forfiles and has a search mask that I believe would allow one to limit which files.


forfiles [/P pathname] [/M searchmask] [/S] [/C command] [/D [+ | -] [{<date> | <days>}]]


So, if one wanted to delete all the LNK*.PNL files older than 30 days


forfiles /p "C:\PMAIL\MAIL" /M LNK*.PNL /S /D -30 /c "cmd /c del @file"

In the above command it would be processing the Base Directory and all subdirectories because of the /S. If just want to do a specific user Mail directory change path to "C:\PMAIL\MAIL\user" and drop the /S.


The /M is described as:
/M <searchmask> Searches files according to the specified search mask. The default searchmask is *


But would copy the LNK*.PNL files to another directory, and also put some other files in directory. Copying to retain the date otherwise they would not be older than 30 days. Put some files not meeting the mask to make sure it doesn't delete them if older than 30 days.


wine and dosbox-x don't seem to support the forfiles option, so could test it.


On liinux the command would be like this.
find /path/to/ -type f -mtime +30 -name '*.gz' -execdir rm -- '{}' \;


For my directory with full path
find /home/msetzerii/.wine/drive_c/PMAIL/MAIL/ -type f -mtime +30 -name 'LNK*.PNL' -execdir rm -- '{}' \;


First, Did a quick search and found something that might do what you want, but would be very careful to make sure it works correctly. Don&#039;t have a windows machine handy so can&#039;t test it at moment. Found this, but it is to delete all files older than 30 days in the path, so that would not be what one wants. ForFiles /p &quot;C:\My Folder&quot; /s /d -30 /c &quot;cmd /c del @file&quot; Another page gave more info on forfiles and has a search mask that I believe would allow one to limit which files. forfiles [/P pathname] [/M searchmask] [/S] [/C command] [/D [+ | -] [{&lt;date&gt; | &lt;days&gt;}]] So, if one wanted to delete all the LNK*.PNL files older than 30 days forfiles /p &quot;C:\PMAIL\MAIL&quot; /M LNK*.PNL /S /D -30 /c &quot;cmd /c del @file&quot; In the above command it would be processing the Base Directory and all subdirectories because of the /S. If just want to do a specific user Mail directory change path to &quot;C:\PMAIL\MAIL\user&quot; and drop the /S. The /M is described as: /M &lt;searchmask&gt; Searches files according to the specified search mask. The default searchmask is * But would copy the LNK*.PNL files to another directory, and also put some other files in directory. Copying to retain the date otherwise they would not be older than 30 days. Put some files not meeting the mask to make sure it doesn&#039;t delete them if older than 30 days. wine and dosbox-x don&#039;t seem to support the forfiles option, so could test it. On liinux the command would be like this. find /path/to/ -type f -mtime +30 -name &#039;*.gz&#039; -execdir rm -- &#039;{}&#039; \; For my directory with full path find /home/msetzerii/.wine/drive_c/PMAIL/MAIL/ -type f -mtime +30 -name &#039;LNK*.PNL&#039; -execdir rm -- &#039;{}&#039; \;

mikes@guam.net

live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft