Subject: Re: Delete a file and start a Windows application
From: "Paul Y. Peng" <[email-masked]>
To: "Larry Hall (RFK Partners, Inc)" <[email-masked]>
Cc: [email-masked]
Date: Wed, 05 Jul 2000 18:38:24 -0230

"Larry Hall (RFK Partners, Inc)" wrote:
> 
> At 04:22 PM 7/5/2000, you wrote:
> >I am new comer of this list and I checked the archive and didn't
> >find any answer to my questions:
> >
> >1. How can I delete a file in such a way that it is actually moved
> >into recycle bin and can be restored later, say, by using Windows
> >Explorer?
> 
> I'm not sure you can, without writing a script to move the file there.

I have no idea about how to write such a script if it can do this
job. I cd'ed to recycle directory under bash and found that deleted
files there have very strange names, which Windows Explorer may know
what they stand for and where to find their original locations and
names.

If a script can do this job, I would like to know how to write
one. Then I can alias or map rm to it. Whenever I want a deleted
file back, I can always start Windows Explorer to do this job.
It is very useful for Cygwin users, isn't it?

> >2. Why can't I get bash command line prompt back when certain Windows
> >applications are launched from bash command line? GVim is an example.
> >I have to explicitly enter "GVim &" to get the prompt back. However,
> >the MS Windows explorer does give me this trouble.
> 
> You could use command /c gvim.exe but that's not easier than gvim &.
> Comparing explorer to bash is like comparing apples and oranges.  If
> you want to see if something is cygwin specific, a better test is to see
> how it works compared to a DOS prompt.

I think you misunderstood what I want to do here. First of all,
my message is not so clear and the last sentence should be read
as "However, the MS Windows explorer doesn't give me this trouble."
What I wonder is why to get the prompt back, for gvim, I have to
enter "gvim &" while for (launching) Windows Explorer, I just
need to enter "explorer" and no "&" is required?

To save entering "&", I tried the following alias without success

	alias v="gvim $1 &"

I also tried the following shell script

	:
	#!/bin/sh
	gvim $1 &

It does the job, but with an annoying error message window for "Sh"
saying that "This program has performed an illegal operation and
will be shut down ..."

Hope it is clearer now. Thanks for the prompt help.

Paul.

--
Want to unsubscribe from this list?
Send a message to [email-masked]