China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 23:40
中国DOS联盟论坛 » DOS媒体世界 & 网络技术 (多媒体室) » 请问在bat文件中如何判断映射服务器的存在? Translated: How to determine the existence of a mapped server in a bat file? View 1,718 Replies 1
Original Poster Posted 2005-10-10 11:23 ·  中国 辽宁 大连 联通
初级用户
Credits 22
Posts 3
Joined 2005-09-13 00:00
20-year member
UID 42484
Gender Male
Status Offline
Dear experts:
Little brother is asking about a problem related to NET USE.

I know that the NET USE command can be used under the DOS command line to retrieve mapped drive information.

But, how to judge the existence of this mapped information in a bat file?

For example: using the following command
NET USE S: \\192.168.1.169\sharefolder /user:sss ppp
to create a mapped drive, then how to judge the existence of drive S in the bat file?

Thanks for everyone's help!
Floor 2 Posted 2010-06-09 11:48 ·  美国 戴尔电脑公司
新手上路
Credits 3
Posts 2
Joined 2009-08-27 10:14
16-year member
UID 151058
Gender Male
Status Offline
Try to `cd` to the drive letter, and then use `if` to judge
Forum Jump: