Variable %P and long Pathname

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
eschaefer
Junior Member
Junior Member
Posts: 8
Joined: 2007-04-14, 21:24 UTC

Variable %P and long Pathname

Post 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
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3381
Joined: 2003-05-06, 11:46 UTC

Post 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
Hoecker sie sind raus!
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post 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
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Moved to TC7 beta discussion forum.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
eschaefer
Junior Member
Junior Member
Posts: 8
Joined: 2007-04-14, 21:24 UTC

Post 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>
Post Reply