DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Search Folders Only?  (Read 11,872 times)

snail02

  • Participant
  • Joined in 2008
  • *
  • Posts: 48
Search Folders Only?
« on: November 19, 2008, 01:26 AM »
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: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Search Folders Only?
« Reply #1 on: November 19, 2008, 01:40 AM »
add +\ to your search to only find folders.

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

jdd

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 214
Re: Search Folders Only?
« Reply #2 on: November 19, 2008, 02:00 AM »
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: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Search Folders Only?
« Reply #3 on: November 19, 2008, 02:17 AM »
anyone else having a problem getting +\ to work?  it works perfectly here.

snail02

  • Participant
  • Joined in 2008
  • *
  • Posts: 48
Re: Search Folders Only?
« Reply #4 on: November 19, 2008, 02:34 AM »
+\ 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
Re: Search Folders Only?
« Reply #5 on: November 19, 2008, 02:59 AM »
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: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Search Folders Only?
« Reply #6 on: November 19, 2008, 03:01 AM »
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
  • *
  • Posts: 48
Re: Search Folders Only?
« Reply #7 on: November 19, 2008, 03:18 AM »
@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
  • *
  • Posts: 48
Re: Search Folders Only?
« Reply #8 on: November 19, 2008, 12:29 PM »
okay.. the following code worked..
1000>>>Folder Only>->dosearch +\ $$1>+>^fd(.*)$

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,175
    • Coding Snacks
    • Participated in NANY Challenge Three Times
    • Plugin Coding Medal
Re: Search Folders Only?
« Reply #9 on: November 22, 2008, 01:49 AM »
As a complement to herojoker's solution, the autohotkey script from an old thread (
http://www.donationcoder.com/forum/index.php?topic=12478.0 ) can be useful:

Code
~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.

Original address: https://www.donationcoder.com/forum/index.php?topic=15796.0