subst I: c:\dir1
subst K: c:\dir2
But when I run the batch file I get a continuous non-stop display as
follows:-
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
C:\>subst i: C:\dir1
and on and on ............
Am I missing something?
Is it possible to use SUBST in a batch file?
If so, what do I change?
--
Joe Boy
Which OS?
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FI-65101, Finland
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.htm
Don't use "subst.bat" as the name for your batch file.
So you are psychic or know this problem of old! :-)
Now I feel quite stupid for making such a silly mistake!!
Many thanks for taking the time to put me straight.
Cheers ..............
--
Joe Boy
>Joe Boy <joe...@invalid.invalid> wrote:
>> I want to use a batch file using the SUBST command
>
>Which OS?
>
> All the best, Timo
Windows Vista, sorry - I should have said in the original post.
But see my reply to Herbert.
Thanks for replying.
--
Joe Boy
>> Don't use "subst.bat" as the name for your batch file.
> So you are psychic or know this problem of old! :-)
Using a command name also as a batch name is a subtle, but quite a
common mistake. A FAQ actually. E.g.
89} All of a sudden "echo." doesn't work any more. What's wrong?
http://www.netikka.net/tsneti/info/tscmd089.htm
If other ways are possible, I would recommend not using subst at all. At
least it might cause strange situations with Windows file deletes,
because the substituted drive letters seem to get a recycle bin of their
own.
>Joe Boy <joe...@invalid.invalid> wrote:
>> Herbert Kleebauer <kl...@unibwm.de> wrote:
>>>> subst I: c:\dir1
>>>> subst K: c:\dir2
>>>> But when I run the batch file I get a continuous non-stop display as
>
>>> Don't use "subst.bat" as the name for your batch file.
>
>> So you are psychic or know this problem of old! :-)
>
>Using a command name also as a batch name is a subtle, but quite a
>common mistake. A FAQ actually. E.g.
> 89} All of a sudden "echo." doesn't work any more. What's wrong?
> http://www.netikka.net/tsneti/info/tscmd089.htm
>
>If other ways are possible, I would recommend not using subst at all. At
>least it might cause strange situations with Windows file deletes,
>because the substituted drive letters seem to get a recycle bin of their
>own.
>
> All the best, Timo
G'Day Timo
Thanks for the tip.
--
Joe Boy