delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/20/16:32:33

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Kevin Markle <kmarkle AT pbs DOT org>
Subject: Re: Mapping windows drives in cygwin?
Date: Fri, 20 Apr 2007 16:31:52 -0400
Lines: 59
Message-ID: <mn.a3df7d7488e7cc57.51129@pbs.org>
References: <mn DOT 9b2e7d74755eba61 DOT 51129 AT pbs DOT org> <4627F4E8 DOT 2020903 AT yahoo DOT com>
Reply-To: kmarkle AT pbs DOT org
Mime-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Keith Christian expressed precisely :
> Kevin Markle wrote:
>> Hello,
>> 
>> Does anybody know of a simple way to map network drives from withing a 
>> cygwin script? :o)
>
> Hi Kevin,
>
> This method works:
>
>
> #====Using a hostname for the remote machine=====
> 	net  use  \\\\sandstone.bedrock.net\\IPC$  /user:bedrock\\fflintstone  
> /persistent:no
> 	(You'll be prompted for a password)
>
>
> #====Using an IP address for the remote machine=====
> 	net  use  \\\\192.168.2.100\\IPC$  /user:bedrock\\fflintstone  
> /persistent:no
> 	(You'll be prompted for a password)
>
>
> #=====Map drive Z: to the C: drive on the remote server=====
> 	net  use  z:  \\\\sandstone.bedrock.net\\C$
> 	--or--
> 	net  use  z:  \\\\192.168.2.100\\C$
>
> 	ls -latr /cygdrive/z  (get a directory listing on the mapped drive)
>
>
> The first line sets up an IPC channel to the server you're interested in 
> mapping to.
> The second maps drive Z: to the C: share.
>
> To UNMAP, use this syntax, just as in CMD.EXE.
>
> 	net use Z: /delete
>
>
>
> =========Keith

I tryed the last method which will give me a drive letter and I get:
kmarkle AT backup ~
$ net use y: \\winops-hq\c$
System error 67 has occurred.

The network name cannot be found.


kmarkle AT backup ~
$ net use y: \\\\winops-hq\c$
System error 67 has occurred.

The network name cannot be found.




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019