X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: 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 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/