Mail Archives: cygwin/2003/01/14/17:40:52
Ralf,
Please keep the discussion on the list so other people have access to this
information and opportunity to share their experience. That "Reply-To:"
is there for a reason.
It's quite possible that something like this would happen. It makes sense
that some sort of versioning is used for the deleted files. There might
also be a difference between recycle bins on NTFS and FAT32 filesystems.
I should probably have added a disclaimer that the script below is
untested, as I, myself, don't use this kind of trick. The next place to
look would probably be MSDN (<http://msdn.microsoft.com/>)... You might
even need to resort to using rundll32 and calling a function that erases
the file.
I'm sorry I can't be of more help.
Igor
P.S. I don't know Michael Steiner, sorry.
On Tue, 14 Jan 2003, Ralf Hauser wrote:
> Igor,
>
> Thanks for the hint.
> My win2k doesn't know /cygdrive/c/RECYCLER/ but /cygdrive/c/Recycled
>
> When just moving to the latter, it gets there and can be seen via cygwin
> command line "ls" (I just see the correct extension, but not the filename -
> it comes like "Dc712".html), but when opening the windows recycle bin icon,
> I don't see it.
>
> Doing that "ls -t ... | head -1" yields INFO2 to me and that appears to be a
> binary info file about where the files were deleted from and when.
>
> Trying to redo your RECYCLE_BIN_PATH got me slightly into trouble because
> when I copied a test file to
> /cygdrive/c/RECYCLER/INFO2 going back to the windows representation of the
> Recycle bin, all information was wiped and it claims to only contain 0 files
> while under cygwin's "ls", still all the D###.* files are there.
> Right-mouse-click refresh unfortunately doesn't help.
>
> Any thoughts?
>
> Ralf
>
> P.S.: Don't worry I don't think anything I desperately want to recover was
> in my recycle bin...
> P.P.S.: Say hello to Michael Steiner he just started to work at Watson
> too...
> > -----Original Message-----
> > From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu]
> > Sent: Dienstag, 14. Januar 2003 22:06
> > To: Ralf Hauser
> > Cc: cygwin AT cygwin DOT com
> > Subject: Re: Move to Windows Recycle Bin instead of deleting
> >
> >
> > On Tue, 14 Jan 2003, Ralf Hauser wrote:
> >
> > > Is there a way to have the files moved to the windows recycle bin from
> > > the cygwin shell window/command line?
> >
> > Yes. In your ~/.bashrc:
> >
> > RECYCLE_BIN_PATH="<location of your recycle bin>"
> > function rm() { mv "$@" "$RECYCLE_BIN_PATH" }
> >
> > The one gotcha of the above is that "mv" will get the options passed to
> > "rm" - not sure if there are any discrepancies. However, if you stick to
> > "rm -r" and "rm -f", you should be fine.
> >
> > The procedure for finding the location of the recycle bin depends on your
> > operating system and your setup. On my Win2k machine, I can simply use
> >
> > RECYCLE_BIN_PATH="/cygdrive/c/RECYCLER/`ls -t
> > /cygdrive/c/RECYCLER|head -1`"
> >
> > Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -