%P%N returns does not return selected dirs

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
adoeller
Junior Member
Junior Member
Posts: 85
Joined: 2011-05-23, 09:47 UTC

%P%N returns does not return selected dirs

Post by *adoeller »

Hi,

i am trying to pass selected dirs in the source panel to the batch file creator addon, using "%P%N". But what I get are the files in the selected subdirs.

this is a bit confusing. is this how the %N is supposed to work?
how to pass over the selected dirs?

command: imc_convert.exe -a -c -i"%P%N"
result: imc_convert.exe -a -c -i"Rohdaten_und_Config\2015-07-06 14-22-38 (2)\Force@Pallet (08).RAW"

what i selected: "2015-07-06 14-22-38 (2)" in "Rohdaten_und_Config"
what i expected: imc_convert.exe -a -c -i"Rohdaten_und_Config\2015-07-06 14-22-38 (2)"

Cheers,
Alex
User avatar
Dalai
Power Member
Power Member
Posts: 10035
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

I don't think this is caused by TC. Just set a question mark at the very first position of the parameters field to see the parameters TC will use for the command (of the button or start menu).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 16140
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2adoeller
command: imc_convert.exe -a -c -i"%P%N"
You have to use %P%N in the Parameters field - NOT in the Command field - like this:
command: imc_convert.exe -a -c -i
parameters: %P%N
Last edited by petermad on 2015-07-08, 13:46 UTC, edited 2 times in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
solid
Power Member
Power Member
Posts: 755
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

If I understand you correctly, you want to pass the selected folders not files.
In that case use %P%S instead of %P%N
adoeller
Junior Member
Junior Member
Posts: 85
Joined: 2011-05-23, 09:47 UTC

Post by *adoeller »

@petermad, that is what i do, shorted it a little bit. for the post

%P%S does not work either. it just gives me the same as %P

adding ? in front of the parameters gives me the expected result.

This tracked the problem down to the batch file creator addon, by Christian Ghisler. It seems that it is supposed to work this way, having two different placeholders, one if files are selected, and one if dirs are selected.

Thanks for your help
User avatar
nsp
Power Member
Power Member
Posts: 1953
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

adoeller wrote:@petermad, that is what i do, shorted it a little bit. for the post

%P%S does not work either. it just gives me the same as %P

adding ? in front of the parameters gives me the expected result.

This tracked the problem down to the batch file creator addon, by Christian Ghisler. It seems that it is supposed to work this way, having two different placeholders, one if files are selected, and one if dirs are selected.

Thanks for your help
Do you use MakeBat or any wcx addon to build your bat ?
If yes, when a folder is selected, all files inside are sent and not the folder name :(. In your case, if you only have one file, %P will give what you want but if you have multiple file inside, the call will be multiplied by the number of file, it could be even worse if you ticked recursive folder pack...:twisted:

If you want to create bat and/or execute it, i encourage you to give a look to TCBL. Or any tools/Script that build the bat from tc command using %L or %P%S and not integrated into a packer plugin !

TCBL normally create a batch,execute it an delete it but if you only want to create a batch file without execution and keep it, you can do it in a tcbl.ini section. if interested post here to not pollute standard TC questions.
adoeller
Junior Member
Junior Member
Posts: 85
Joined: 2011-05-23, 09:47 UTC

Post by *adoeller »

i was using MakeBat, because TCBL crashes before creating the batch file, i.e. before showing it, using the -e option.

id did not have time to track this down, so i used MakeBat, that i use for other purposes.
User avatar
nsp
Power Member
Power Member
Posts: 1953
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

adoeller wrote:i was using MakeBat, because TCBL crashes before creating the batch file, i.e. before showing it, using the -e option.

id did not have time to track this down, so i used MakeBat, that i use for other purposes.
If you have some time now, You could try with latest version (32bit) 1.02 and if it still crash, get more details of what is done use debug mode -d.
Post Reply