This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: drag and drop folder from Explorer to cygwin
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 03 Apr 2008 12:49:30 -0700
- Subject: Re: drag and drop folder from Explorer to cygwin
- References: <52388.7403.qm@web51910.mail.re2.yahoo.com>
- Reply-to: cygwin at cygwin dot com
Richard Trevor wrote:
> I'd like to drag a folder from Windows Explorer (XP) and drop it on the cygwin desktop shortcut,
> causing a cygwin (bash) shell to open in the folder directory.
I don't think there's any magic to it, when you drop something onto a
shortcut it just sets the arguments to the filenames of the items. So
you'd need to modify the batch file to check if %1 is set and use the
chere mechanism, i.e. cd to %1 and then set CHERE_INVOKING to prevent
the /etc/profile from changing to $HOME.
Brian
--
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/