Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 09, 2016, 07:32:09 AM
  • Proudly celebrating 10 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: Search Folders Only?  (Read 5516 times)

snail02

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 47
    • View Profile
    • Donate to Member
Search Folders Only?
« on: November 18, 2008, 07:26:27 PM »
Hello,
I download FARR today, and it's a great program.
So far i have left the settings to its default.
The priority of the folder searching is at the right place when i am looking for something both as a file and folder.
However, sometimes i want to search for folders only.
Is there any way to search for folders only, possibly with an alias?
i.e. if i want to search for all folders called "opera", i type in "fd opera" and it displays only folders named opera (fd as the alias for 'folders only').

Is that possible, or any other method to achieve the same result?
Thanks.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,421
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Search Folders Only?
« Reply #1 on: November 18, 2008, 07:40:19 PM »
add +\ to your search to only find folders.

ps. i think -\ or +. will exclude folders

jdd

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 214
    • View Profile
    • Donate to Member
Re: Search Folders Only?
« Reply #2 on: November 18, 2008, 08:00:59 PM »
Ability to search for folders is a great idea but when I type +\ or -\ it doesn't seem to work.  Any other suggestions?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,421
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Search Folders Only?
« Reply #3 on: November 18, 2008, 08:17:39 PM »
anyone else having a problem getting +\ to work?  it works perfectly here.

snail02

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 47
    • View Profile
    • Donate to Member
Re: Search Folders Only?
« Reply #4 on: November 18, 2008, 08:34:39 PM »
+\ worked for me when there is a space between the search term and "+\"
i.e. "+\ opera" worked, "+\opera" didn't.

Is there any other method?...cos typing + on a laptop is a bit difficult..

herojoker

  • Participant
  • Joined in 2008
  • *
  • Posts: 124
    • View Profile
    • Donate to Member
Re: Search Folders Only?
« Reply #5 on: November 18, 2008, 08:59:21 PM »
Use the dosearch function!  ;D
Import this into your alias list:
1000>>>test>->dosearch +\ $$1>+>\$ (.*)

Then $ foo searches for folders with foo.
Of course you can change the regular expression such that it fits your needs.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,421
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Search Folders Only?
« Reply #6 on: November 18, 2008, 09:01:11 PM »
snail nailed it, you have to have either like:
"opera +\" or "+\ opera"

and hero explained how to use an alias to make it easier to type one thing and search for another.

snail02

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 47
    • View Profile
    • Donate to Member
Re: Search Folders Only?
« Reply #7 on: November 18, 2008, 09:18:43 PM »
@hero, Pardon my ignorance..but how do i assign a different keyword to your function?
$ folder searches for 'folder'. however, when i change that to any other letter, and search using that expression, it doesn't work.
if i wanted to search for folders with regular expression 'fd' what would the function look like?
Thanks a lot !

snail02

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 47
    • View Profile
    • Donate to Member
Re: Search Folders Only?
« Reply #8 on: November 19, 2008, 06:29:46 AM »
okay.. the following code worked..
1000>>>Folder Only>->dosearch +\ $$1>+>^fd(.*)$

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: Search Folders Only?
« Reply #9 on: November 21, 2008, 07:49:02 PM »
As a complement to herojoker's solution, the autohotkey script from an old thread (
http://www.donationc...ex.php?topic=12478.0 ) can be useful:

~Space::
IfWinActive %A_Space%Find and Run Robot v2
 if A_PriorHotkey = %A_ThisHotkey%
  if A_TimeSincePriorHotkey < 400
   sendinput +\
return
(I've above changed the code from that old thread from "sendinput \" to "sendinput +\" )

I still think that it would be a good idea to have doublespace as a built in hotkey for toggling adding/removing of " +\". But for now, the script should work fine.