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.
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-----
Sent: Dienstag, 14. Januar 2003 22:06
To: Ralf Hauser
Subject: Re: Move to Windows Recycle Bin instead of deleting
Post by Ralf HauserIs there a way to have the files moved to the windows recycle bin from
the cygwin shell window/command line?
RECYCLE_BIN_PATH="<location of your recycle bin>"
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/
|\ _,,,---,,_ ***@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ ***@watson.ibm.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