topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 19, 2024, 5:42 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Alias/command to search a set path  (Read 5268 times)

pmoore

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Alias/command to search a set path
« on: August 08, 2008, 05:07 AM »
This may be possible, but I haven't been able to find the way to do it. I'm new to tailoring FARR's behaviour, so I could easily have missed something. If it's not, could it be treated as a feature request?

I'd like to be able to set up an alias to search a specific set of directories (something like the standard search folders, but for this alias only and probably only one or two folders) and return the executables which match the alias argument. (Ideally, I'd like to be able to filter the list further to exclude console executables - which I can detect using an external program or script - but that may be a bit too complex/slow).

Essentially, I have a directory full of "portable" applications (which don't install shortcuts in the start menu) and I'd like to be able to launch them just by typing in the executable name.

Paul.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Alias/command to search a set path
« Reply #1 on: August 08, 2008, 05:54 AM »
hi there pmoore,

i can show you how i restrict searches to a certain folders and certain extensions, maybe this will give you an idea of Farr's capabilities.

from the 'Options', go to 'List' > 'Search folders', on the right-side pane, create a new entry by right-clicking & choose 'Add new entry'. in the ensuing dialog, enter the search path, extensions to be filtered and a modifier keyword. (see Fig.1). here i use the "My Documents" folder as an example. then from the main window, prefix the modifier keyword with a '+' and type your own query and the results would something from the Fig.2.

Fig.1: enter necessary info
ws-farr-searchfolder-1.png

Fig.2: filtered results from selected folders
ws-farr-searchfolder-2.png

P.S. you can assign the same 'modifier keyword' to other folders and they will come under the same purview. hth.

pmoore

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Re: Alias/command to search a set path
« Reply #2 on: August 08, 2008, 06:42 AM »
That's brilliant. Thanks for the explanation - it does indeed do pretty much exactly what I want.

One further question, if I may. Is there a way of further restricting the list by running a specific check on each file found? I appreciate that this may need a plugin or alias to achieve. The reason I ask is that my "Utils" directory contains a lot of programs, some of which are console utilities, not suitable for running from a GUI tool like FARR. So I'd like to exclude them. I can get most of what I want by simply excluding the relevant directories, but being able to run a check for GUI-mode programs would work regardless of directory structure.

In practice, it may not be important, as FARR's approach of boosting the priority of programs I've used before is likely to be at least as effective. But I'm curious to know if it's possible.

Thanks,
Paul

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Alias/command to search a set path
« Reply #3 on: August 08, 2008, 08:07 AM »
actually, i have a similar structure like yours where i keep all my portable EXEs in a single folder and reference it to Farr's search folder. however i'm not sure if it's possible to identify a GUI tool from a CLI one unless there is a specific criteria to differentiate the two.  :)

herojoker

  • Participant
  • Joined in 2008
  • *
  • Posts: 124
    • View Profile
    • Donate to Member
Re: Alias/command to search a set path
« Reply #4 on: August 09, 2008, 04:04 PM »
If you don't want to enter the modifier each time, you can create a new alias which uses dosearch or restartsearch (see help file for more information).