Page 1 of 1

Variable %P and long Pathname

Posted: 2007-04-14, 21:33 UTC
by eschaefer
Hello,
- adding a new icon in the buttonbar
- runing a batchfile with Parameter %P

It does'nt work if you have an Space/Blank in the Path-Name,
%P returns only Pathname till the first Blank !

and BTW

I missing an %.. which returns only the actual Directoryname,
without the Full-/Long Name

Regards
Egbert

Posted: 2007-04-14, 23:22 UTC
by Sir_SiLvA
Please read the Help, Clo's Tut and use the Search

%P works fine but you should put it in Quotes (")
Otherwise your OS cuts the String at the first Space...

HTH

Posted: 2007-04-14, 23:29 UTC
by karlchen
Hi, Egbert.

NO BUG:
The variable %P works as designed and desribed in the help.
It will hold the complete path plus a trailing \.
This is true for pathnames enclosing blanks as well.

But: %P will give the complete path without enclosing it in double quotes.

This is why you should add the enclosing double quotes before passing the content of %P to a batchfile as a commandline argument, i.e. pass it as "%P".

Karl

Posted: 2007-04-15, 11:36 UTC
by Hacker
[mod]Moved to TC7 beta discussion forum.

Hacker (Moderator)[/mod]

Posted: 2007-04-16, 07:25 UTC
by eschaefer
Hi,
yes it works !
Thanks !
I had the double quotes only in the Batchfile
(e.x. echo "%1").

Any chance to get the actual folder only ?
Background:
Being in Folder Fold1:
I want to copy a File (file1) to file2, but with the folder
als a Part of the Filename.
In the the way of:
copy <file1> <fold1name - sometext>