(solved) Need help with source path as parameter input

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
rachman
Junior Member
Junior Member
Posts: 12
Joined: 2016-10-01, 10:33 UTC

(solved) Need help with source path as parameter input

Post by *rachman »

Hi, everyone
Hopefully someone can help
I'm trying to create a shortcut button for CSearcher with detailed setting:

Command: D:\Programs\CSearcher\CSearcher.exe
Parameters: %P
Start path: <empty>
Icon file: D:\Programs\CSearcher\CSearcher.exe
Icon: 0
Tooltip: CSearcher

If I use it with source path that contains white space, search folder(s) keeps empty. If I use %P%S as parameters. it works fine with selected folder(s) as input. What should I do so it could work with source path as input?
Thanks. Regards. :)
Last edited by rachman on 2017-05-29, 15:53 UTC, edited 1 time in total.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Try:

Parameters: "%P"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
rachman
Junior Member
Junior Member
Posts: 12
Joined: 2016-10-01, 10:33 UTC

Post by *rachman »

That doesn't work here.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Please describe CSearcher command line syntax, it is impossible to guess parameters w/o it.
rachman
Junior Member
Junior Member
Posts: 12
Joined: 2016-10-01, 10:33 UTC

Post by *rachman »

I'm sorry that I forget about it
Image: http://i.imgur.com/8Vs5Zme.png
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It seems that "%P" should really work. Maybe it doesn't like backslashes before closing quote (a stupid Microsoft CRT feature)? You can try "%P." in such case...
Please try starting it manually from command line with different path variations.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6491
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

CSearcher doesn't like the trailing \ which TC adds for %P
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
rachman
Junior Member
Junior Member
Posts: 12
Joined: 2016-10-01, 10:33 UTC

Post by *rachman »

If I try from command line
CSearcher "d:\Programs\My folder\" -> it doesn't work
CSearcher "d:\Programs\My folder" -> it works


Anyway thank you guys. by using "%P.", now it works.
I didn't see that in help (probably I missed it). regards. :)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

rachman wrote:Anyway thank you guys. by using "%P.", now it works.
I didn't see that in help (probably I missed it). regards. :)
It is not listed in help, it is just a trick. A dot is a pseudo-item that points to current directory (just as two dots point to upper directory) so d:\Programs\My folder and d:\Programs\My folder\. mean the same directory (though paths with such extra dots may look not very nice).

BTW you can also try using "%P" in order to escape a backslash from %P... Unfortunately stupid CRT solutions like using backslash as an escape character require such ugly workarounds.
rachman
Junior Member
Junior Member
Posts: 12
Joined: 2016-10-01, 10:33 UTC

Post by *rachman »

Yes, "%P\" also works. Thank you.
Post Reply