Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there a way to: net use x: "\\{current computer name}\shared"? 1

Status
Not open for further replies.

dotobi

Technical User
Mar 9, 2004
229
0
0
HK
Hi

I need to write a .bat script to be run on each PC and part of it needs to do this:

net use x: "\\{current computer name}\shared"

Is there a way?

Perhaps there’s a way to give a folder a drive letter of it’s own temporarily, but I don’t know of any other way than ‘net use’.

The server is SBS2003 and the PCs are XP pro SP2.

Thanks
 
net use x: \\127.0.0.1\sharename
 
Actually, just realised that if you want to assign a drive letter to a folder, the folder doesn't even need to be shared. You can use the subst command:
subst x: %systemdrive%\folderpath
 
great. works a treat. thanks again
 
net use x: \\%COMPUTERNAME%\shared


my two cents worth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top