| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| References: | <mn DOT 9b2e7d74755eba61 DOT 51129 AT pbs DOT org> |
| Subject: | RE: Mapping windows drives in cygwin? |
| Date: | Thu, 19 Apr 2007 18:47:03 +0100 |
| Message-ID: | <009301c782aa$bd66ca70$2e08a8c0@CAM.ARTIMI.COM> |
| MIME-Version: | 1.0 |
| X-Mailer: | Microsoft Office Outlook 11 |
| In-Reply-To: | <mn.9b2e7d74755eba61.51129@pbs.org> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
On 19 April 2007 18:35, Kevin Markle wrote:
> Hello,
>
> Does anybody know of a simple way to map network drives from withing a
> cygwin script? :o)
You can invoke the standard "net use" command with only the slight
complication of having to either escape or quote the backslashes, or use
forward slashes. Examples: (slightly forged, for privacy reasons)
/tmp $ net view \\\\tinytim
Shared resources at \\tinytim
Share name Type Used as Comment
-----------------------------------------------------------------------------
all-homes Disk S: all-homes on Tinytim
arch_preambles Disk Architecture data sets
cad Disk CAD installation directory
hardware Disk
lab Disk O:
sys_test Disk System test
sysadmin Disk
~dk Disk Home Directory
The command completed successfully.
/tmp $ net view '\\tinytim'
Shared resources at \\tinytim
Share name Type Used as Comment
-----------------------------------------------------------------------------
all-homes Disk S: all-homes on Tinytim
arch_preambles Disk Architecture data sets
cad Disk CAD installation directory
hardware Disk
lab Disk O:
sys_test Disk System test
sysadmin Disk
~dk Disk Home Directory
The command completed successfully.
/tmp $ net use X: '\\tinytim\sysadmin'
The command completed successfully.
/tmp $ ls /cygdrive/x
Bakbone NetApp
Certance Network Diagrams
Cisco Phaser7300DN_SpecialPrint.pdf
Correspondence SNAP
IM845G Motherboard Users Guide.pdf Software_Licensing
Installs tmp
Manuals tmpbkup
MySQL winventory
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |