Searching across backups?

I am completely missing a passage in my current version. I remember writing it but must have inadvertently deleted it, I have the daily backups, a bunch of them on drop box. Aside from unzipping and reopening every single file (not sure when I actually wrote it, probably a month ago…), is there a way to search for a specific word across the zip files?

Edited to add…I solved this by finding the passage under a different chapter, in the wrong place. Must have been a cut/paste incident! Still this would be a good question for future reference.

Sorry, ZIP files are not searchable.

(The reason is that the compression algorithm is effectively a form of encryption. ZIP files do not contain human readable text.)

Katherine

Sorry, I lost my roll against pedanticism.

ZIP files are searchable but the software has to take the extra step to de-compress them somewhere to do so (usually in memory or a temporary file) so it can search the plainstream. And compression is not the same as encryption; it is a cypher and the resulting stream is not human-readable, but because it is trivially reversible without a key it’s not encryption.

I figured as much. Thank you!

Not exactly sure what you are saying here. I am guessing that the summary is that the software does not support this. Thank you for your response.

It takes a program that is designed to work with archived and compressed formats to search across them, is the point being made. Such programs do exist; on Windows I’m aware of a tool called PowerGrep (or something like that), which can search across .zip files for text phrases found within the files inside the .zip. I’m not sure of anything GUI-friendly for Mac that can do it, though. There may well be something, I’m just familiar with such tools and since I tend to drop to the command-line for this kind of stuff.

[size=120]Geek Level Stuff Follows…[/size]

As to that, we have a handy tool that ships with the Mac called zgrep, that can scan a .zip file’s contents and located string matches within it, using the same search syntax available to the stock grep. Since Scrivener projects are packaged folders with many files within them (and the internal Zip directory tree will reflect that), you need to use the -R flag for recursive searching. For example:

zgrep -R 'phrase to find' MyProject.bak1.zip

Now to scan a whole batch of zip files, you need to produce a list of .zip files and search each one individually (the -R recursion flag conflicts with a glob list, like ‘MyProject*’). Here is how you would locate which backups contain ‘phrase to find’, from all of the backups created for a project named “MyProject” (run this from the backup folder, otherwise change the ‘.’ to the full path of the backup folder, which can be copied as text from the Backup preference pane):

find . -name 'MyProject*zip' -print0 | xargs -0 zgrep -R 'phrase to find'

The result of this is useful in that it doesn’t go in and pinpoint every little internal XML and RTF files that might contain the phrase. Rather it will simply state that “Binary file X matches”. From that you now should know which .zip files contain the phrase.