Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

War is never imperative. -- McCoy, "Balance of Terror", stardate 1709.2


computers / microsoft.public.windowsxp.general / Re: Command window : change its title after changing directory ?

SubjectAuthor
* Command window : change its title after changing directory ?R.Wieser
+* Command window : change its title after changing directory ?JJ
|+- Command window : change its title after changing directory ?JJ
|`- Command window : change its title after changing directory ?R.Wieser
`* Command window : change its title after changing directory ?Herbert Kleebauer
 `* Command window : change its title after changing directory ?R.Wieser
  `- Command window : change its title after changing directory ?Herbert Kleebauer

1
Command window : change its title after changing directory ?

<t9q60s$1mgm$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: 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: microsoft.public.windowsxp.general
Subject: Command window : change its title after changing directory ?
Date: Sat, 2 Jul 2022 21:23:49 +0200
Organization: Aioe.org NNTP Server
Lines: 29
Message-ID: <t9q60s$1mgm$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="55830"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646: Format=Flowed; Original
X-MSMail-Priority: Normal
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
 by: R.Wieser - Sat, 2 Jul 2022 19:23 UTC

Hello all,

I would like to have the command window the name of the current folder (I
often have multiple ones open / on the taskbar). For that I've got a
command replacement like this :

doskey cd=cd /d $* ^&^& d:\owncmds\dos\SetTitle.bat

with "SetTitle.bat" being

For %%F in ("%CD%") do Set Title %%~nxF

(The "For" construct because it cannot seem to apply "~nx" on an environment
variable)

This works.

I would like to get rid of the "SetTitle" batchfile though. The problem
with that is when I replace the calling of that batchfile with its contents
(and change "%CD%" to "%%CD%%") the name of the command window will show the
folder I just left, instead of the folder I've moved into.

Does anyone have an idea how to fix this ?

Regards,
Rudy Wieser

Re: Command window : change its title after changing directory ?

<105fdfgloz564$.cpcfwk5kbxf5$.dlg@40tude.net>

  copy mid

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

  copy link   Newsgroups: microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jj4public@outlook.com (JJ)
Newsgroups: microsoft.public.windowsxp.general
Subject: Re: Command window : change its title after changing directory ?
Date: Sun, 3 Jul 2022 09:00:55 +0700
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <105fdfgloz564$.cpcfwk5kbxf5$.dlg@40tude.net>
References: <t9q60s$1mgm$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="edfb9ceae9d7242199a9e13d85fad8fd";
logging-data="3003342"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/P/f/0p1zlXFiIpD2C103vleCEZIO8tk="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:/WPl0CzhqOHudq5sBJtq0SH/pMI=
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
 by: JJ - Sun, 3 Jul 2022 02:00 UTC

On Sat, 2 Jul 2022 21:23:49 +0200, R.Wieser wrote:
> Hello all,
>
> I would like to have the command window the name of the current folder (I
> often have multiple ones open / on the taskbar). For that I've got a
> command replacement like this :
>
> doskey cd=cd /d $* ^&^& d:\owncmds\dos\SetTitle.bat
>
> with "SetTitle.bat" being
>
> For %%F in ("%CD%") do Set Title %%~nxF
>
> (The "For" construct because it cannot seem to apply "~nx" on an environment
> variable)
>
> This works.
>
> I would like to get rid of the "SetTitle" batchfile though. The problem
> with that is when I replace the calling of that batchfile with its contents
> (and change "%CD%" to "%%CD%%") the name of the command window will show the
> folder I just left, instead of the folder I've moved into.
>
> Does anyone have an idea how to fix this ?
>
> Regards,
> Rudy Wieser

Use this.

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

Re: Command window : change its title after changing directory ?

<20tdvzf789ro.6dskugipgqb8$.dlg@40tude.net>

  copy mid

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

  copy link   Newsgroups: microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jj4public@outlook.com (JJ)
Newsgroups: microsoft.public.windowsxp.general
Subject: Re: Command window : change its title after changing directory ?
Date: Sun, 3 Jul 2022 09:10:34 +0700
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <20tdvzf789ro.6dskugipgqb8$.dlg@40tude.net>
References: <t9q60s$1mgm$1@gioia.aioe.org> <105fdfgloz564$.cpcfwk5kbxf5$.dlg@40tude.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="edfb9ceae9d7242199a9e13d85fad8fd";
logging-data="3005634"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CENUNF+sq7vFyiP+olrKTnbC/FVZj1YY="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:wD6/+vIkkENhP+5TdV922GUMh+I=
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
 by: JJ - Sun, 3 Jul 2022 02:10 UTC

On Sun, 3 Jul 2022 09:00:55 +0700, JJ wrote:
>
> Use this.
>
> doskey cd=cd/d $* $T for /d ^%A in (.) do @title ^%~nxA

Apparently, DOSKEY's `$T` special code caused the macro to somehow emit an
extra ENTER key (WTH).

Replace it with `^&` instead, just like in your original code. i.e.

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

Re: Command window : change its title after changing directory ?

<t9rhsq$9n9$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: 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: microsoft.public.windowsxp.general
Subject: Re: Command window : change its title after changing directory ?
Date: Sun, 3 Jul 2022 09:52:46 +0200
Organization: Aioe.org NNTP Server
Lines: 52
Message-ID: <t9rhsq$9n9$1@gioia.aioe.org>
References: <t9q60s$1mgm$1@gioia.aioe.org> <105fdfgloz564$.cpcfwk5kbxf5$.dlg@40tude.net>
Injection-Info: gioia.aioe.org; logging-data="9961"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-Priority: 3
X-Notice: Filtered by postfilter v. 0.9.2
X-RFC2646: Format=Flowed; Original
 by: R.Wieser - Sun, 3 Jul 2022 07:52 UTC

JJ,

> Use this.
>
> doskey cd=cd/d $* $T for /d ^%A in (.) do @title ^%~nxA
....
> Apparently, DOSKEY's `$T` special code caused the macro to somehow
> emit an extra ENTER key (WTH).
>
> Replace it with `^&` instead, just like in your original code. i.e.

Alas, both fail with an "~nxA was unexpected at this time."

When running that the above from within a batchfile this gets displayed :

"c:\>doskey cd=cd/d $* & for /d ~nxA"

IOW, the command partially disappears. :-|

But ... you gave me a push to try to mix-and-match stuff. :-)

It turns out that my "^$^$" can be replaced by "^$".

Your "^%A" / "^%~nxA" doesn't quite work here, so I put "%%A" / "%%~nxA"
back.

I'm not sure what the "/d" for the "for" command does here. The code works
with and without.

And the source of my problem ? My usage of "%%CD%%" - replacing it with
your "." works.

The odd thing is that I'm sure I tried that too. But looking back I tried
several ones in a test batchfile, with the old tries "neutralized" by
preceeding them with a "rem" statement. Only now I realize that the "rem"
only worked for the first part, with the part after the "^$^$" still being
executed - and throwing an error. Which threw me off.

What I ended up with and seems to work is this :

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

Thanks for your help.

Regards,
Rudy Wieser

Re: Command window : change its title after changing directory ?

<t9skkn$647$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: microsoft.public.windowsxp.general
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!aioe.org!CN/DM0WMqLWWRDBkNTZtHQ.user.46.165.242.91.POSTED!not-for-mail
From: klee@unibwm.de (Herbert Kleebauer)
Newsgroups: microsoft.public.windowsxp.general
Subject: Re: Command window : change its title after changing directory ?
Date: Sun, 3 Jul 2022 19:45:59 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t9skkn$647$1@gioia.aioe.org>
References: <t9q60s$1mgm$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="6279"; 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 17:45 UTC

On 02.07.2022 21:23, R.Wieser wrote:
> Hello all,
>
> I would like to have the command window the name of the current folder (I
> often have multiple ones open / on the taskbar). For that I've got a
> command replacement like this :
>
> doskey cd=cd /d $* ^&^& d:\owncmds\dos\SetTitle.bat
>
> with "SetTitle.bat" being
>
> For %%F in ("%CD%") do Set Title %%~nxF
>
> (The "For" construct because it cannot seem to apply "~nx" on an environment
> variable)
>
> This works.
>
>
> I would like to get rid of the "SetTitle" batchfile though. The problem
> with that is when I replace the calling of that batchfile with its contents
> (and change "%CD%" to "%%CD%%") the name of the command window will show the
> folder I just left, instead of the folder I've moved into.
>
> Does anyone have an idea how to fix this ?

That was discussed a few weeks ago in alt.msdos.batch.nt

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

Re: Command window : change its title after changing directory ?

<t9src1$10cs$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: 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: microsoft.public.windowsxp.general
Subject: Re: Command window : change its title after changing directory ?
Date: Sun, 3 Jul 2022 21:40:36 +0200
Organization: Aioe.org NNTP Server
Lines: 24
Message-ID: <t9src1$10cs$1@gioia.aioe.org>
References: <t9q60s$1mgm$1@gioia.aioe.org> <t9skkn$647$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="33180"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646: Format=Flowed; Response
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
 by: R.Wieser - Sun, 3 Jul 2022 19:40 UTC

Herbert,

> That was discussed a few weeks ago in alt.msdos.batch.nt

Thank you. I've taken a peek into that newsgroup and found the thread.

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

Hmmm... Are you sure that will work ? I mean, the "set dd=cd" part isn't
stored by doskey ...

As a check I put the above in a batchfile, ran it and than looked at the
command windows caption. It said "dd%". Also, "doskey /macros" shows
"cd=cd $* &call title dd%"

Ah, I see that "%^%dd^%%" should have been "^%%dd^%%". That fixes the
environment variable, but doesn't change the "set dd=cd" problem.

Thanks for mentioning the thread though, I'm off reading it.

Regards,
Rudy Wieser

Re: Command window : change its title after changing directory ?

<t9t1i4$1h7v$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: 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: microsoft.public.windowsxp.general
Subject: Re: Command window : change its title after changing directory ?
Date: Sun, 3 Jul 2022 23:26:28 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t9t1i4$1h7v$1@gioia.aioe.org>
References: <t9q60s$1mgm$1@gioia.aioe.org> <t9skkn$647$1@gioia.aioe.org>
<t9src1$10cs$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="50431"; 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:26 UTC

On 03.07.2022 21:40, R.Wieser wrote:
> Herbert,
>
>> That was discussed a few weeks ago in alt.msdos.batch.nt
>
> Thank you. I've taken a peek into that newsgroup and found the thread.
>
>> set dd=cd&doskey cd=cd $* ^&call title %^%dd^%%
>
> Hmmm... Are you sure that will work ? I mean, the "set dd=cd" part isn't
> stored by doskey ...
>
> As a check I put the above in a batchfile,

You shouldn't have done that. Just enter it at the command prompt.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor