X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <46506BA1 DOT C3502CCD AT dessent DOT net> Subject: RE: How to uniformly point to the root of a drive? Date: Sun, 20 May 2007 16:51:42 +0100 Message-ID: <0a3801c79af6$c32395b0$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <46506BA1.C3502CCD@dessent.net> 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 20 May 2007 16:39, Brian Dessent wrote: > Thorsten Kampe wrote: > >> is there a way to consistently point (in a script for instance) to the >> root of a removable drive (flash drive)? >> >> The root could be /cygdrive/g on one computer and on the other >> /cygdrive/f (I have no control of the drive letters). One solution >> would be to install Cygwin to \ (instead of the standard \cygwin) but >> for clarity's sake I would like to keep the Cygwin stuff in a >> directory of its own. > > I assume you mean the root directory of the drive on which Cygwin is > installed, i.e. the drive containing /: > > echo "root dir of / is $(cygpath "$(cygpath -m / | cut -b1-3)")" > > This will fail for UNC paths and so on, but you can check for that I > suppose. You can use any arbitrary path in place of /, but be sure to > quote as necessary. This relies on the mountpoints being set correctly, which might not work if your drive letter changes ... 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/