Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

To downgrade the human mind is bad theology. -- C. K. Chesterton


computers / microsoft.public.windowsxp.general / Re: how do I set the window title to the current directory path?

SubjectAuthor
* how do I set the window title to the current directory path?R.Wieser
+* how do I set the window title to the current directory path?Herbert Kleebauer
|`* how do I set the window title to the current directory path?R.Wieser
| `* how do I set the window title to the current directory path?Herbert Kleebauer
|  `* how do I set the window title to the current directory path?R.Wieser
|   `* how do I set the window title to the current directory path?R.Wieser
|    `* how do I set the window title to the current directory path?R.Wieser
|     +- how do I set the window title to the current directory path?Kenny McCormack
|     +* how do I set the window title to the current directory path?Herbert Kleebauer
|     |`- how do I set the window title to the current directory path?R.Wieser
|     `- how do I set the window title to the current directory path?R.Wieser
`* how do I set the window title to the current directory path?Kenny McCormack
 `* how do I set the window title to the current directory path?R.Wieser
  `- how do I set the window title to the current directory path?Kenny McCormack

1
Re: how do I set the window title to the current directory path?

<t9st8l$1pl8$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3487&group=microsoft.public.windowsxp.general#3487

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Sun, 3 Jul 2022 22:13:00 +0200
Organization: Aioe.org NNTP Server
Lines: 47
Message-ID: <t9st8l$1pl8$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me> <XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1> <t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com>
Injection-Info: gioia.aioe.org; logging-data="59048"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Sun, 3 Jul 2022 20:13 UTC

crossposted to crossposted to microsoft.public.windowsxp.general

Kenny,

For some "odd reason" I had the same question but posted it into the
microsoft.public.windowsxp.general. Herbert Kleebauer alerted me to this
thread.

>>set dd=cd
>>doskey cd=cd $* ^&call title %^%dd^%%
>>
>
> Indeed it does! Kudos to you for figuring that out.

Herbert also posted your final(?) solution :

> set dd=cd&doskey cd=cd $* ^&call title %^%dd^%%

I think that you have found out by now that that doesn't quite work. For
multiple reasons :

Take a look at what "doskey /macros" shows you. You might notice that the
stored command replacement is this : "cd=cd $* &call title dd%". Which
ofcourse means that the title of your command window will always be "dd%"

Easy to fix, either use "^%%dd^%%" - or just "%%dd%%". ("^%dd^%" doesn't
work)

The biggest problem however is that the "set dd=cd&" part of your command
isn't stored in the doskey command replacement. Which ofcourse means that
the current directory is ony *once* stored into the "dd" variable, and than
used for all the window captions. And I don't think that is what you
want(ed). :-)

Also, IFAIKS that "call" in there is not needed.

With the help of JJ I found a solution which seems to work nicely :

doskey cd=cd /d $* ^& for %%A in (.) do @title %%~nxA

(caveat: I did my work under XPsp3)

Regards,
Rudy Wieser

Re: how do I set the window title to the current directory path?

<t9t14b$1c9a$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3488&group=microsoft.public.windowsxp.general#3488

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!CN/DM0WMqLWWRDBkNTZtHQ.user.46.165.242.91.POSTED!not-for-mail
From: klee@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Sun, 3 Jul 2022 23:19:07 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t9t14b$1c9a$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me>
<XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1>
<t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org>
<t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="45354"; posting-host="CN/DM0WMqLWWRDBkNTZtHQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Herbert Kleebauer - Sun, 3 Jul 2022 21:19 UTC

On 03.07.2022 22:13, R.Wieser wrote:
> crossposted to crossposted to microsoft.public.windowsxp.general
>
> Kenny,
>
> For some "odd reason" I had the same question but posted it into the
> microsoft.public.windowsxp.general. Herbert Kleebauer alerted me to this
> thread.
>
>>>set dd=cd
>>>doskey cd=cd $* ^&call title %^%dd^%%
>>>
>>
>> Indeed it does! Kudos to you for figuring that out.
>
> Herbert also posted your final(?) solution :
>
>> set dd=cd&doskey cd=cd $* ^&call title %^%dd^%%
>
> I think that you have found out by now that that doesn't quite work. For
> multiple reasons :

Did you try it? Here it works.

> Take a look at what "doskey /macros" shows you. You might notice that the
> stored command replacement is this : "cd=cd $* &call title dd%". Which
> ofcourse means that the title of your command window will always be "dd%"

Here I get:

D:\>set dd=cd&doskey cd=cd $* ^&call title %^%dd^%%

D:\>doskey /macros
cd=cd $* &call title %%dd%%

> Easy to fix, either use "^%%dd^%%" - or just "%%dd%%". ("^%dd^%" doesn't
> work)

The fix is the bug!

> The biggest problem however is that the "set dd=cd&" part of your command
> isn't stored in the doskey command replacement. Which ofcourse means that

It don't have to be stored in the doskey macro. It is just a one line
replacement for:

set dd=cd
doskey cd=cd $* ^&call title %^%dd^%%

> the current directory is ony *once* stored into the "dd" variable, and than
> used for all the window captions. And I don't think that is what you
> want(ed). :-)

Not the current directory is stored in the variable "dd" but the
string "cd"

> Also, IFAIKS that "call" in there is not needed.

Without the call it wouldn't work.

> With the help of JJ I found a solution which seems to work nicely :
>
> doskey cd=cd /d $* ^& for %%A in (.) do @title %%~nxA
>
> (caveat: I did my work under XPsp3)

Re: how do I set the window title to the current directory path?

<t9u69p$jar$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3490&group=microsoft.public.windowsxp.general#3490

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 09:53:11 +0200
Organization: Aioe.org NNTP Server
Lines: 78
Message-ID: <t9u69p$jar$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me> <XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1> <t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org> <t9t14b$1c9a$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="19803"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-Notice: Filtered by postfilter v. 0.9.2
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Response
 by: R.Wieser - Mon, 4 Jul 2022 07:53 UTC

Herbert,

>> I think that you have found out by now that that doesn't quite work. For
>> multiple reasons :
>
> Did you try it? Here it works.

When I doubt something works I normally test it before posting about it.
As I've done this time too.

>> Easy to fix, either use "^%%dd^%%" - or just "%%dd%%". ("^%dd^%" doesn't
>> work)
>
> The fix is the bug!

You might want to explain that.

As mentioned, when I use "doskey /macros" I see that that "%^%dd^%%" has
been turned into "dd%" - which definitily doesn't give the sought-for
result.

>> The biggest problem however is that the "set dd=cd&" part of your command
>> isn't stored in the doskey command replacement. Which ofcourse means
>> that
>
> It don't have to be stored in the doskey macro. It is just a one line
> replacement for:

Yeah, you already said that. The problem is that you are not *explaining*,
nor do I see you give any test results.

> Not the current directory is stored in the variable "dd" but the string
> "cd"

Oh blimy, I overlooked that the "cd" there doesn't have "%" signs around it
(set dd=%cd%"). That makes it even worse : What you end up with is "title
cd". And at least here that "cd" there is regarded as *text*, not as a
command.

(ignore this. I now understand how your posted solution works)

>> Also, IFAIKS that "call" in there is not needed.
>
> Without the call it wouldn't work.

It does here.

Maybe you should tell us which OS you're using / that "alt.msdos.batch.nt"
newsgroup is ment for ?

AFAIKS you seem to think that the solution you posted (you got from there)
should also work under XP. And as I've been telling you, it doesn't.

>> As a check I put the above in a batchfile,
>
> You shouldn't have done that. Just enter it at the command prompt.

Ackkk.... thats quite a bit of a difference. I've just tried it that way
and it works. And now I also understand why you need that "call" in
there.

Not usefull to me though, as I have zero wish to type it in every time I
open a command window. :-(

And I would still suggest to put that "set dd=cd" part *inside* the doskey
macro - other batchfiles could overwrite the "dd" environment variable and
leave you with unexpected results.

Regards,
Rudy Wieser

P..s
I can't seem to figure out how to put more "%" / "^%" sequences around that
"%^%dd^%%" to get it to work when started from a batchfile. (yeah, I already
have a working solution. That doesn't mean I'm not interrested in other
solutions too).

Re: how do I set the window title to the current directory path?

<t9ugq1$1fei$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3491&group=microsoft.public.windowsxp.general#3491

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!g5FztXLO/MyW1GS7zwuBNg.user.46.165.242.91.POSTED!not-for-mail
From: klee@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 12:52:51 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t9ugq1$1fei$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me>
<XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1>
<t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org>
<t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org>
<t9t14b$1c9a$1@gioia.aioe.org> <t9u69p$jar$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="48594"; posting-host="g5FztXLO/MyW1GS7zwuBNg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Herbert Kleebauer - Mon, 4 Jul 2022 10:52 UTC

On 04.07.2022 09:53, R.Wieser wrote:

>>> As a check I put the above in a batchfile,
>>
>> You shouldn't have done that. Just enter it at the command prompt.
>
> Ackkk.... thats quite a bit of a difference. I've just tried it that way
> and it works. And now I also understand why you need that "call" in
> there.
>
> Not usefull to me though, as I have zero wish to type it in every time I
> open a command window. :-(

It is the same as like

for %i in (hello world) do echo %i

It does work on the command line but not in a batch file. If you want
to use it in a batch file, you have to add a few %:

set dd=cd
doskey cd=cd $* ^&call title %%%%dd%%%%

> And I would still suggest to put that "set dd=cd" part *inside* the doskey
> macro - other batchfiles could overwrite the "dd" environment variable and
> leave you with unexpected results.

You can use any name which is not used by other batch code instead
of "dd". But if there is a naming conflict with an other batch, then
maybe it is better the doskey macro stops working than the other
batch stops working.

Re: how do I set the window title to the current directory path?

<t9ujud$vrh$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3492&group=microsoft.public.windowsxp.general#3492

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 13:46:07 +0200
Organization: Aioe.org NNTP Server
Lines: 40
Message-ID: <t9ujud$vrh$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me> <XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1> <t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org> <t9t14b$1c9a$1@gioia.aioe.org> <t9u69p$jar$1@gioia.aioe.org> <t9ugq1$1fei$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="32625"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646: Format=Flowed; Response
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Mon, 4 Jul 2022 11:46 UTC

Herbert,

> It does work on the command line but not in a batch file. If you want
> to use it in a batch file, you have to add a few %:

I know. I just didn't get it to work.

> set dd=cd
> doskey cd=cd $* ^&call title %%%%dd%%%%

And as is appears now I was just too focussed on keeping those "^" in there.
You /said/ they where part of the solution. :-)

> You can use any name which is not used by other batch code instead of
> "dd".

I've got another solution - not using an environment variable :

You could use my origional solution (from before you posted, with the "for
%%A" in it) and remove the "~nx" part. The below also works :

(from within a batchfile)

doskey cd=echo off^&cd $*$Ttitle %%cd%%^&echo on

The trick is that the "$T" in there takes the place of the "call", but also
delays the expansion of the %CD% variable. The "echo off" and "echo on"
parts are needed because "$T" displays another prompt.

Thanks for your responses. I had some fun trying the different
possibilities out.

Regards,
Rudy Wieser

P.s.
I still like my solution which only displays the last folders name best
though. :-)

Re: how do I set the window title to the current directory path?

<t9ul7c$2djno$1@news.xmission.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3493&group=microsoft.public.windowsxp.general#3493

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!1.us.feeder.erje.net!feeder.erje.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 12:08:12 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <t9ul7c$2djno$1@news.xmission.com>
References: <t39fh7$uqd$1@dont-email.me> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org>
Injection-Date: Mon, 4 Jul 2022 12:08:12 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2543352"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 4 Jul 2022 12:08 UTC

In article <t9st8l$1pl8$1@gioia.aioe.org>,
R.Wieser <address@not.available> wrote:
>crossposted to crossposted to microsoft.public.windowsxp.general
>
>Kenny,
>
>For some "odd reason" I had the same question but posted it into the
>microsoft.public.windowsxp.general. Herbert Kleebauer alerted me to this
>thread.

Keep in mind that most of what you attribute to me (as in, "Your (Kenny's)
code, blah, blah, blah") is not mine at all. Most of it was dreamed up,
composed, and posted by Herbert. So, credit where credit is due.

In particular, if you see code that omits the space after the &, that's a
Herbert trademark.

N.B. I'm not saying it is wrong. In fact, it is quite right to do that.
But most code that I wrote won't have it.

Just tryin' to help you do your archaeology...

--
There are many self-professed Christians who seem to think that because
they believe in Jesus' sacrifice they can reject Jesus' teachings about
how we should treat others. In this country, they show that they reject
Jesus' teachings by voting for Republicans.

Re: how do I set the window title to the current directory path?

<t9um2g$1vjc$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3494&group=microsoft.public.windowsxp.general#3494

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 14:13:29 +0200
Organization: Aioe.org NNTP Server
Lines: 13
Message-ID: <t9um2g$1vjc$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org> <t9ul7c$2djno$1@news.xmission.com>
Injection-Info: gioia.aioe.org; logging-data="65132"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
X-RFC2646: Format=Flowed; Original
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Mon, 4 Jul 2022 12:13 UTC

Kenny,

> Keep in mind that most of what you attribute to me (as in, "Your (Kenny's)
> code, blah, blah, blah") is not mine at all. Most of it was dreamed up,
> composed, and posted by Herbert. So, credit where credit is due.

My apologies to both of you. I thought it was you who put it together with
Herbert commenting upon it.

Regards,
Rudy Wieser

Re: how do I set the window title to the current directory path?

<t9um2h$1vjc$2@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3495&group=microsoft.public.windowsxp.general#3495

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 14:22:26 +0200
Organization: Aioe.org NNTP Server
Lines: 19
Message-ID: <t9um2h$1vjc$2@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me> <XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1> <t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org> <t9t14b$1c9a$1@gioia.aioe.org> <t9u69p$jar$1@gioia.aioe.org> <t9ugq1$1fei$1@gioia.aioe.org> <t9ujud$vrh$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="65132"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-RFC2646: Format=Flowed; Response
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Mon, 4 Jul 2022 12:22 UTC

Herbert,

I wrote :

>> And as is appears now I was just too focussed on keeping those "^" in
>> there. You /said/ they where part of the solution. :-)

I got a brainfart and thought of something else to try :

set dd=cd&doskey cd=cd $* ^&call title %%^dd%%

(see the environment variable at the end)

It also works, and is easier to read & convert to in-batchfile usage.

Regards,
Rudy Wieser

Re: how do I set the window title to the current directory path?

<t9uqkv$2dmbl$1@news.xmission.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3496&group=microsoft.public.windowsxp.general#3496

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 13:40:47 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <t9uqkv$2dmbl$1@news.xmission.com>
References: <t39fh7$uqd$1@dont-email.me> <t9st8l$1pl8$1@gioia.aioe.org> <t9ul7c$2djno$1@news.xmission.com> <t9um2g$1vjc$1@gioia.aioe.org>
Injection-Date: Mon, 4 Jul 2022 13:40:47 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2546037"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 4 Jul 2022 13:40 UTC

In article <t9um2g$1vjc$1@gioia.aioe.org>,
R.Wieser <address@not.available> wrote:
>Kenny,
>
>> Keep in mind that most of what you attribute to me (as in, "Your (Kenny's)
>> code, blah, blah, blah") is not mine at all. Most of it was dreamed up,
>> composed, and posted by Herbert. So, credit where credit is due.
>
>My apologies to both of you. I thought it was you who put it together with
>Herbert commenting upon it.

Actually, some other poster originally asked the question, then I suggested
a partial solution that almost works, but I conceded that it did not work 100%
and I didn't care to spend any more time on it. Herbert then picked it up
and ran with it from there.

--
There are a lot of Wisconsin farmers right now who, despite having
themselves voted for Trump, are now wishing that their state's electors
had had the good sense to vote for the other candidate - thereby saving
them from their current predicament.

Re: how do I set the window title to the current directory path?

<t9uqpm$5eb$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3497&group=microsoft.public.windowsxp.general#3497

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 15:43:05 +0200
Organization: Aioe.org NNTP Server
Lines: 19
Message-ID: <t9uqpm$5eb$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me> <XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1> <t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org> <t9t14b$1c9a$1@gioia.aioe.org> <t9u69p$jar$1@gioia.aioe.org> <t9ugq1$1fei$1@gioia.aioe.org> <t9ujud$vrh$1@gioia.aioe.org> <t9um2h$1vjc$2@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="5579"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
 by: R.Wieser - Mon, 4 Jul 2022 13:43 UTC

Herbert,

I wrote :

> I got a brainfart and thought of something else to try :

Got another one : no intermediate environment variable and, IMHO, even
easier to work with :

set doskey cd=cd $* ^&call title %%c^^d%%

(from within a batchfile)

.... I must have /way/ to much time on my hands.

Regards,
Rudy Wieser

Re: how do I set the window title to the current directory path?

<t9ur48$2dmbl$2@news.xmission.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3498&group=microsoft.public.windowsxp.general#3498

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!panix!1.us.feeder.erje.net!feeder.erje.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 13:48:56 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <t9ur48$2dmbl$2@news.xmission.com>
References: <t39fh7$uqd$1@dont-email.me> <t9ujud$vrh$1@gioia.aioe.org> <t9um2h$1vjc$2@gioia.aioe.org> <t9uqpm$5eb$1@gioia.aioe.org>
Injection-Date: Mon, 4 Jul 2022 13:48:56 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2546037"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 4 Jul 2022 13:48 UTC

In article <t9uqpm$5eb$1@gioia.aioe.org>,
R.Wieser <address@not.available> wrote:
>Herbert,
>
>I wrote :
>
>> I got a brainfart and thought of something else to try :
>
>Got another one : no intermediate environment variable and, IMHO, even
>easier to work with :
>
>set doskey cd=cd $* ^&call title %%c^^d%%
>
>(from within a batchfile)
>
>... I must have /way/ to much time on my hands.

Sounds like it. Sounds like you lead a happy life.
Congrats.

--
He must be a Muslim. He's got three wives and he doesn't drink.

Re: how do I set the window title to the current directory path?

<t9v282$1ls4$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3499&group=microsoft.public.windowsxp.general#3499

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!g5FztXLO/MyW1GS7zwuBNg.user.46.165.242.91.POSTED!not-for-mail
From: klee@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 17:50:25 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t9v282$1ls4$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me>
<XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1>
<t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org>
<t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org>
<t9t14b$1c9a$1@gioia.aioe.org> <t9u69p$jar$1@gioia.aioe.org>
<t9ugq1$1fei$1@gioia.aioe.org> <t9ujud$vrh$1@gioia.aioe.org>
<t9um2h$1vjc$2@gioia.aioe.org> <t9uqpm$5eb$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="55172"; posting-host="g5FztXLO/MyW1GS7zwuBNg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Herbert Kleebauer - Mon, 4 Jul 2022 15:50 UTC

On 04.07.2022 15:43, R.Wieser wrote:

> Got another one : no intermediate environment variable and, IMHO, even
> easier to work with :
>
> set doskey cd=cd $* ^&call title %%c^^d%%
>
> (from within a batchfile)

That is a good one. For me batch programming is "trial and error"
and I would have never found this solution.

Re: how do I set the window title to the current directory path?

<t9v9ui$1f54$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3500&group=microsoft.public.windowsxp.general#3500

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Mon, 4 Jul 2022 20:01:43 +0200
Organization: Aioe.org NNTP Server
Lines: 26
Message-ID: <t9v9ui$1f54$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me> <XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1> <t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org> <t9t14b$1c9a$1@gioia.aioe.org> <t9u69p$jar$1@gioia.aioe.org> <t9ugq1$1fei$1@gioia.aioe.org> <t9ujud$vrh$1@gioia.aioe.org> <t9um2h$1vjc$2@gioia.aioe.org> <t9uqpm$5eb$1@gioia.aioe.org> <t9v282$1ls4$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="48292"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Mon, 4 Jul 2022 18:01 UTC

Herbert,

> That is a good one. For me batch programming is "trial and error" and I
> would have never found this solution.

Although I know know a few things about batch programming, new areas are
mostly "trial and error" to me, just like for you.

It just struck me that if a "^" (escape char) could be used to tinker around
with the "%" and "&" marks like you did that there would be a possibility
that it would also work when applied to the environment variable. And as
the reason for the "dd" variable was to keep the "%cd%" variable from being
resolved too early it was a short step to putting enough "^" markers next to
the "cd" chars themselves to keep them from the "%cd% sequence being
recognised until the last step. Putting those "^" between the "c" and "d"
just made the whole string look balanced / nice.

Yep, a lot of "trial and error" I'm afraid. I've now got a batchfile with
over 10 attempts (the ones I cared to keep. Must have gone thru over 20 of
them - including ones with "echo" instead of "title") that all failed in
different ways. :-)

Regards,
Rudy Wieser

Re: how do I set the window title to the current directory path?

<ta0po7$vn3$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3501&group=microsoft.public.windowsxp.general#3501

  copy link   Newsgroups: alt.msdos.batch.nt microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: alt.msdos.batch.nt,microsoft.public.windowsxp.general
Subject: Re: how do I set the window title to the current directory path?
Date: Tue, 5 Jul 2022 09:37:29 +0200
Organization: Aioe.org NNTP Server
Lines: 20
Message-ID: <ta0po7$vn3$1@gioia.aioe.org>
References: <t39fh7$uqd$1@dont-email.me> <XnsAE8B9D0FB62EFammammatatiscalineti@127.0.0.1> <t4q2h3$3n752$1@news.xmission.com> <t4rfdk$p24$1@gioia.aioe.org> <t4rhq8$3nujc$1@news.xmission.com> <t9st8l$1pl8$1@gioia.aioe.org> <t9t14b$1c9a$1@gioia.aioe.org> <t9u69p$jar$1@gioia.aioe.org> <t9ugq1$1fei$1@gioia.aioe.org> <t9ujud$vrh$1@gioia.aioe.org> <t9um2h$1vjc$2@gioia.aioe.org> <t9uqpm$5eb$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="32483"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MSMail-Priority: Normal
 by: R.Wieser - Tue, 5 Jul 2022 07:37 UTC

Herbert,

> set doskey cd=cd $* ^&call title %%c^^d%%
>
> (from the within a batchfile)

This morning I woke up with a "I /have/ too look into that" thought : the
above can be interfered with.

Just type "set c^^d=foobar" on the commandline, and that "foobar" will be
all the caption you get.

IOW, trying to hide an evironment variables name isn't foolproof.

.... even when I sleep I seem to have too much time on my hands. :-)

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor