Restoring hits from Recycle Bin?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
terrypin
Posts: 184
Joined: Mon Mar 18, 2013 2:41 pm

Restoring hits from Recycle Bin?

Post by terrypin » Sat Apr 16, 2022 9:23 am

In several tests, after a search and then using Restore from the context menu, folders did not appear to be restored.

Image

NotNull
Posts: 3741
Joined: Wed May 24, 2017 9:22 pm

Re: Restoring hits from Recycle Bin?

Post by NotNull » Sat Apr 16, 2022 10:08 am

Every Windows useraccount gets his own Recycle bin.
The S-1-5-21-.... folder might belong to a different user account and therefore restoring might not be allowed.

Do you see the folder in Windows' Recycle Bin?

terrypin
Posts: 184
Joined: Mon Mar 18, 2013 2:41 pm

Re: Restoring hits from Recycle Bin?

Post by terrypin » Sun Apr 17, 2022 1:15 pm

Thanks. I'd assumed it was there but no. I could not find it, in what I would call 'my Recycle Bin' and you have called 'Windows' Recycle Bin.

So I don't understand what this different bin is, to which Everything refers? I'm the only user of this Win 10 PC, so would not expect multiple bins.

Just did another test. Deleted a folder. Found it in my Recycle Bin. Searched for it using Everything, which found it in
J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H
Used Restore - but it did not reappear in File Explorer.
Searched with Everything, which still found it only in the above obscurely named location.

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Sun Apr 17, 2022 1:36 pm

Thank you for the bug report terrypin,

I am looking into the issue.

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Tue Apr 19, 2022 4:17 am

This is a limitation with the Windows Shell / Recycle Bin.

Restore only works on $r* files directly in the recycle bin.
(restore will not work on $i files or files inside another folder inside the recycle bin)
In your case this would be:
J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H

(not J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H\7unnamedFolders-647files )

terrypin
Posts: 184
Joined: Mon Mar 18, 2013 2:41 pm

Re: Restoring hits from Recycle Bin?

Post by terrypin » Wed Apr 20, 2022 10:25 am

Thanks for isolating it so quickly.

But can you confirm that I've correctly understood please. Does that mean tasks like the example are not possible? IOW, after finding that it is in the recycle bin, I cannot restore it from Everything?

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Wed Apr 20, 2022 10:30 am

In your case you would need to restore the entire folder:
J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H

The single file inside this folder cannot be restored on its own.


In the next alpha update you'll be able to copy the following file:
J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H\7unnamedFolders-647files
to your desktop

You could do this now from a command prompt:

Code: Select all

copy "J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H\7unnamedFolders-647files" %USERPROFILE%\desktop

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Thu Apr 21, 2022 7:07 am

Everything 1.5.0.1310a allows cut/copy on Recycle bin items.

terrypin
Posts: 184
Joined: Mon Mar 18, 2013 2:41 pm

Re: Restoring hits from Recycle Bin?

Post by terrypin » Thu Apr 21, 2022 8:28 am

Excellent, thanks! Duly downloaded and it's scanning now, so will try that shortly.


Meanwhile I tried your suggestion but got the following:

C:\WINDOWS\system32>copy "J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H\7unnamedFolders-647files" %USERPROFILE%\desktop
J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H\7unnamedFolders-647files\*
The system cannot find the file specified.
0 file(s) copied.

EDIT a few minutes later:
Probably because that search '7unnamedFolders-647files' was for a folder?

NotNull
Posts: 3741
Joined: Wed May 24, 2017 9:22 pm

Re: Restoring hits from Recycle Bin?

Post by NotNull » Thu Apr 21, 2022 4:05 pm

terrypin wrote:
Thu Apr 21, 2022 8:28 am
Probably because that search '7unnamedFolders-647files' was for a folder?
Correct. For folders you can use XCOPY (see XCOPY /? for extra options)

terrypin
Posts: 184
Joined: Mon Mar 18, 2013 2:41 pm

Re: Restoring hits from Recycle Bin?

Post by terrypin » Thu Apr 21, 2022 4:16 pm

Thanks NotNull.

terrypin
Posts: 184
Joined: Mon Mar 18, 2013 2:41 pm

Re: Restoring hits from Recycle Bin?

Post by terrypin » Thu Apr 21, 2022 4:21 pm

void wrote:
Wed Apr 20, 2022 10:30 am

In the next alpha update you'll be able to copy the following file:
J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H\7unnamedFolders-647files
to your desktop
Don't see any 'copy to desktop' entry in the right-click context menu?

therube
Posts: 3457
Joined: Thu Sep 03, 2009 6:48 pm

Re: Restoring hits from Recycle Bin?

Post by therube » Thu Apr 21, 2022 4:44 pm

When "viewing" $Recycle.Bin, there is a context-menu item, 'Restore', (& as it mentions) 'Returns the selected items to their original locations'.


(Problem as I see it, is you don't know, particularly where said $R<rand> file will be restored to, much less its' original name.
You can add a 'Property' column to display that information.)

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Fri Apr 22, 2022 4:35 am

terrypin wrote:
Thu Apr 21, 2022 4:21 pm
void wrote:
Wed Apr 20, 2022 10:30 am

In the next alpha update you'll be able to copy the following file:
J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H\7unnamedFolders-647files
to your desktop
Don't see any 'copy to desktop' entry in the right-click context menu?
Use Copy on 7unnamedFolders-647files (right click 7unnamedFolders and click Copy)
Then Paste on your Desktop. (right click Desktop and click Paste)
Using the Desktop is just an example, you can paste into any folder.

terrypin
Posts: 184
Joined: Mon Mar 18, 2013 2:41 pm

Re: Restoring hits from Recycle Bin?

Post by terrypin » Fri Apr 22, 2022 11:15 am

There is no 'Copy', so I assume you mean 'Copy Full Path to Clipboard'.
That places this text on the clipboard:
J:\$RECYCLE.BIN\S-1-5-21-1643601740-1098315019-3821599572-1004\$R0VZO9H\7unnamedFolders-647files\
(Screenshot '(1.88)' is puzzling!)

But as it's text, it cannot be pasted into a folder, without further steps. So I suspect I must have misunderstood somewhere?

Anyway, it's no big deal. Unless it can be restored with a simple click from Everything, as I first assumed, then it seems even slower than searching in Recycle Bin as usual.

BTW, what's the simplest way to prevent any Recycle hits?

Image
Last edited by terrypin on Fri Apr 22, 2022 11:20 am, edited 3 times in total.

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Fri Apr 22, 2022 11:17 am

Sorry, You are correct, there is no Copy item.

However, you can select the item and press Ctrl + C to copy it to the clipboard.
Then on the Desktop press Ctrl + V

terrypin
Posts: 184
Joined: Mon Mar 18, 2013 2:41 pm

Re: Restoring hits from Recycle Bin?

Post by terrypin » Fri Apr 22, 2022 11:40 am

void wrote:
Fri Apr 22, 2022 11:17 am
Sorry, You are correct, there is no Copy item.

However, you can select the item and press Ctrl + C to copy it to the clipboard.
Then on the Desktop press Ctrl + V
Thanks, that's now a handy feature. Although a downside, as @therube said, is that it doesn't restore automatically to its original location.

therube
Posts: 3457
Joined: Thu Sep 03, 2009 6:48 pm

Re: Restoring hits from Recycle Bin?

Post by therube » Fri Apr 22, 2022 2:48 pm

Oh, my comments below deal with 15.0.1310.
(Were we talking about 14, above?)

Restoring hits from Recycle Bin?
Is broken in 1310.
(Regression from 1309.)

Context menu, Restore does not work.
Nor does context-menu, Properties, Restore.
All files show as 0-bytes, with no further data given.
(Properties dialog box is essentially devoid of data.)

(Opening /Recycle Bin/ does allow for successful restore.)

Index Journal records nothing regarding any attempted restore.

Code: Select all

Everything
Version 1.5.0.1310a (x86)
Windows NT 6.1
Processors 4
IsAdmin 0
AppData 0
Service 1
cmdline .\everything.exe  -instance 15
SetActiveWindow failed 00000000
WM_ACTIVATE 00000000 00000000, lastfocus 059e05ec, current focus 059e05ec
WM_ACTIVATE 00000001 00000000, lastfocus 059e05ec, current focus 00000000
FOCUS 0
FOCUS restore
ENTER ACTION
_ui_shell_IDataObjectAsyncCapability_create
ParseDisplayName M:\$RECYCLE.BIN\S-1-5-21-3350321682-930001023-2409569994-1000\$
RE5JL4J.mp3
pidl focus from path 149b4730
pidl focus 149b4730
1 pidls
get menu pidls: 1
cdfmc2 00000000 74ee703a 01390360 00000000 00000000
got menu 1346fb98
menu type 1
menu type 3
QueryContextMenu...
QueryContextMenu 000000a7
rem dbl sep 13
rem dbl sep 15
rem dbl sep 15
track menu 5bb00765
default 32794
WM_INITMENUPOPUP 5bb00765 00000000
menu count 15
menu item info fail 87
00000000
wid 8: 167 (000000a6)
VERB undelete
80070057
00000000
wid 10: 25 (00000018)
VERB cut
menu item info fail 87
00000000
wid 12: 18 (00000011)
VERB delete
80070057
00000000
wid 14: 20 (00000013)
VERB properties
rem dbl sep 15
wmenuhelp 00000000
idCommand 167
using shell implementation
invoke hres 00000000
LEAVE ACTION
WM_ACTIVATE 00000000 00000000, lastfocus 041903ea, current focus 041903ea

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Fri Apr 22, 2022 11:03 pm

Thanks for the bug report therube,

This will be fixed in the next alpha update.

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Thu Apr 28, 2022 6:35 am

Everything 1.5.0.1311a no longer uses simple PIDLs for single file/folder context menus.

Restore should now work correctly on recycle bin files.

This should also fix the issue with some files reporting a file size of 0 under properties.

therube
Posts: 3457
Joined: Thu Sep 03, 2009 6:48 pm

Re: Restoring hits from Recycle Bin?

Post by therube » Thu Apr 28, 2022 6:53 pm

This should also fix the issue with some files reporting a file size of 0 under properties.
Still seeing issues here - with some files.
(Wonder if it's something else, permission or the like?)

Oh.
It's files in subdirectories to /$recycle.bin/, so non-$R files.

Was that expected, that they'd report 0?
.
.
Everything - 1311 0-byte recycle.bin item.png
Everything - 1311 0-byte recycle.bin item.png (25.63 KiB) Viewed 1995 times

void
Developer
Posts: 9635
Joined: Fri Oct 16, 2009 11:31 pm

Re: Restoring hits from Recycle Bin?

Post by void » Fri Apr 29, 2022 10:58 am

It's files in subdirectories to /$recycle.bin/, so non-$R files.
I've put this on my Things to fix list.

Thank you for the bug report.

Post Reply