Reindex File Names, Only - Purge Non-existent Names

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Reindex File Names, Only - Purge Non-existent Names

Post by therube »

Re-index File Names, Only - i.e., Purge Non-existent Names


is there a way to Reindex file names
without re-indexing file Properties (like hashes)

as in, if you end up with "dead wood" (non-existent file names),
can you get rid of them without doing a "full" Reindex (of names/Properties) ?

something that goes out & checks that names are valid (on disk files).

something like 'Size on Disk' would probably do it (showing an "empty" size),
but it would have to (inefficiently) go out & actually gather that data...

& then even after "found", you still have to do something ? to actually get
rid of the entry (like maybe ? re-creating the exact full path name, & then
deleting it ? maybe ? might work)
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by void »

I will add a command to remove selected items from your index.

Thank you for the suggestion.
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by void »

Everything 1.5.0.1384a adds a command to remove selected item from your index.

To remove selected items from your index:
  • In Everything, from the Bookmarks menu, click Add to Bookmarks.
  • Change the Name to: Purge Non-existent Names
  • Change the Search to:
    /command 40404
  • Optionally set a keyboard shortcut, eg: Ctrl + Backspace.
  • Click OK.
  • Select your files and open this bookmark.


If the removed files/folders are modified they might be re-added to your index.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by therube »

So you have to use a bookmark, can't be done from search bar, something like?
/command 40404 <Full Path>
/command 40404 C:\out\CYG\dumy999.txt
If the removed files/folders are modified they might be re-added to your index.
In my case, they do not physically exist, so that shouldn't happen - unless I recreated a same named file.

might
Wouldn't that be, always.
In that if the file name were recreated anew, or (if the file did actually exist - simply no longer in Everything's .db), if it were "touched", it would be re-added to the .db.

Or are you thinking along the lines of if you wanted to hide certain items from Everything, you could "purge" them, & so long as they remained "static", they would remain not known to Everything.


Alright, dealing with a file seems straight forward.
I can "hide" it, & then cause it to come back.

Dealing with a folder, hmm?
I expected creating a new file within the folder would cause it to be seen, but it does not.
Changing a file within said folder (a file that existed when the directory was was "purged"), did cause that file to come back.

So what, when you Purge a directory, that directory [name] & anything within that directory - even newly created files, are hidden.
And it is only if you "touch" a file (& only that file at that), then that file... no, that's not it either, is it...


OK, can't spend more time on it, at the moment, but looking at it, being able to Purge a directory seems... "dangerous".
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by therube »

Since you can now Purge, since Purge works via a Bookmark, since (theoretically) a Purge-like feature (or any other Bookmark that) is apt to only be infrequently required (though I have created more "deadwood" since this topic started), maybe a checkmark (or similar) way to identify which Bookmarks appear in the Bookmarks (menu) dropdown.

Such that I can always have a Purge bookmark defined (in Organize Bookmarks), but it is only visible from the dropdown, if it is set (checkmarked, in Organize) to actually be displayed.
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by void »

So you have to use a bookmark, can't be done from search bar, something like?
You have to use a bookmark.

I will consider a search command.
However, I would like to keep this feature pretty hidden.


Wouldn't that be, always.
No, if a folder is removed, modified files in subfolders of that folder will not be re-added.

Force a rescan to re-add files/folders:
  • In Everything, from the Tools menu, click Options.
  • Click the Indexes tab on the left.
  • Click Force Rebuild.
  • Click OK.
-or-
Type in the following search and press ENTER:
/reindex c:
where C: is the drive to reindex.


So what, when you Purge a directory, that directory [name] & anything within that directory - even newly created files, are hidden.
Correct.
All subfolders and files are removed from the folder.


OK, can't spend more time on it, at the moment, but looking at it, being able to Purge a directory seems... "dangerous".
It harmless to your files.
If you accidentally remove a folder from your index you would have to reindex which would be undesirable. (not dangerous)
Does the command need a Yes/No/Cancel prompt?


Since you can now Purge, since Purge works via a Bookmark, since (theoretically) a Purge-like feature (or any other Bookmark that) is apt to only be infrequently required (though I have created more "deadwood" since this topic started), maybe a checkmark (or similar) way to identify which Bookmarks appear in the Bookmarks (menu) dropdown.
There's no option to hide bookmarks.
Consider putting the bookmark in it's own folder.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by therube »

Consider putting the bookmark in it's own folder.
Like a Seldom Scene folder. That's a good idea :-).
Force a rescan to re-add files/folders:
And that is just what I'm looking to avoid.

In my case, I was simply looking for a way to remove items that no longer physically existed, but that do show up - without having to Reindex. (And the only reason I'm adverse to reindex, is in the case that Properties are involved, where reindexing is potentially very timely.)

(And with that, prior to Purge, I'd just let those dead wood "files", simply be.)


So... just what is the thought process for the Purge command?
To hide, or a more permanent-ish type of Omit, or...?


My "dangerous" was dangerous in the undesirable way.
(Like if one inadvertently Purged C:.)
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by void »

So... just what is the thought process for the Purge command?
To remove files from your index that no longer exist on disk. (remove dead wood)


or a more permanent-ish type of Omit
Exactly this.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by therube »

I didn't think about it at first, but was 404|04 chosen for some specific reason,
or does 40404 actual map to a particular function ?

Does the command need a Yes/No/Cancel prompt?
Yeah, I'd think it would be "safer" that way.


(so every day for the past x-number of days, i've been coming across these "dead wood" files - regularly.
today [now yesterday], now that i have the code to nix them, i've only come across 1 of them [so far] ;-))
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by void »

The number has no significance.
It was just the next available command ID.
It's unmapped by default.


Yeah, I'd think it would be "safer" that way.
I have put on my TODO list to add another command that prompts before removal.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by therube »

I thought it might have been a play on, 404.
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by void »

40404 was just a happy coincidence.

I have also added to my TODO list to remove dead wood when deleting a file/folder that fails with error 2 (file not found) or error 3 (path not found)
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Reindex File Names, Only - Purge Non-existent Names

Post by void »

Everything 1.5.0.1390a adds the UI command 40405 to remove the selected items from the index with a prompt.
Post Reply