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).