38
196
format, and you have specified file masks here that do not include the file mask for that proprietary file
format, then the IFilter is not used.
By default, PowerGREP uses the IFilter only for PowerPoint and MS Word documents. PowerGREP cannot
decode PowerPoint documents on its own. While PowerGREP can decode MS Word documents, it cannot
handle MS Word documents with Unicode content. You can add additional file masks if you get good results
searching those files with Windows Search but not with PowerGREP.
Never Use IFilter for Files Matching These File Masks
If you specify one or more file masks here, PowerGREP will never use IFilter for files that match one of
these file masks, even if they match one of the file masks you specified for "Only use IFilter...".
PDF and Excel files are excluded by default because PowerGREP’s built-in decoder is much more reliable.
Adobe’s IFilter for PDF files has bugs that may cause PowerGREP to crash. Microsoft’s IFilter for Excel
files does not preserve the layout of rows and columns like PowerGREP’s built-in decoder.
Conversion Cache
Decoding proprietary file formats is quite CPU-intensive. Usually, decoding the file takes several times longer
than actually searching through it. Therefore, PowerGREP keeps a cache of the decoded files. If you search
through the file a second time, and the file is in the cache, PowerGREP can skip the decoding step and
simply search through the cached copy of the file. If you run the same search twice, and all decoded files are
still in the cache, you’ll notice that the second search runs many times faster than the first one. This is
particularly handy when fine-tuning search terms or narrowing down search results with successive searches.
The cache is shared by all instances of PowerGREP that you run on your computer. If you start multiple
instances, you can run multiple searches on the same set of files simultaneously.
By default, PowerGREP will store its cache in the folder that Windows designates for applications to store
temporary files. You can select a different folder if you like. If you select a different folder on the same drive,
PowerGREP will move its cache. If you select a folder on another drive, PowerGREP will clear its cache.
You should select a folder on a local hard disk drive.
While PowerGREP can share the cache with other instances running on your own computer, it cannot share
the cache with PowerGREP instances running on other computers. Though PowerGREP will store its cache
on a network drive if you tell it to, it is up to you to make sure that only one computer will access the cache at
any time. If two people using PowerGREP on their own computers access the cache at the same time, the
cache will become corrupted.
The cache must be large enough to store all the files you’re working with. If only half the files you’re
searching through fit into the cache, then the second half of the files will be cached when the search
completes. When PowerGREP runs out of cache space, it will first discard the cached conversions of the files
you least recently search through. If you search through 10 files of equal size, and only 5 fit into the cache,
file 6 will cause file 1 to be discarded, file 7 discards file 2, etc. If you then repeat the search, file 1 will discard
file 6, etc. In this situation, PowerGREP will never actually read any of the files from the cache. PowerGREP
does not change the order in which it searches files depending on whether they’re cached or not.
34
197
If the cache is large enough, all files will be in the cache when the search completes. If you repeat the search,
PowerGREP will be able to read all the files from the cache.
You can specify how many megabytes of disk space you allow PowerGREP to use for its cache. The default
is 1024 megabytes which equals one gigabyte. You can make the running cache as large as you like, within the
amount of free space on your hard disk. If your hard disk has 100 GB of free space, and you want
PowerGREP to repeatedly search a big file server overnight, you can set aside 90,000 MB for the cache and
have plenty of room to spare on your hard disk.
The ´runningµ size is used as long as at least one PowerGREP instance is running on your computer. When
you close the last instance, PowerGREP will trim the cache down to the ´not runningµ size, if you set it
smaller than the ´runningµ size. If you tend to work with the same set of files over and over, you should set
the ´not runningµ cache to be the same as the ´runningµ cache. Then all converted copies will still be
available the next day, and your searches will run at full speed. If you have limited free hard disk space and
have other applications that use a lot of temporary disk space, trimming the cache is probably a good idea.
If you set the ´not runningµ cache size to zero, PowerGREP will clear the cache entirely when you close the
last instance. If you set the ´runningµ size to zero, PowerGREP will never cache any files in the first place.
You should only disable the cache if you simply don’t have enough disk space to cache all converted files, or
if you never search the same file twice.
Only files in proprietary formats are cached. These are the files that match any of the file masks you’ve
specified in the File Formats Preferences, and for which you’ve selected the ´decode and convert to text prior
to searchingµ option. Files converted using an IFilter are also cached. When estimating the required size of
the cache, you only need to count the files in proprietary formats that PowerGREP decodes or that are
converted using an IFilter.
If you run PowerGREP silently to execute actions in an automated fashion, you can use the /nocache
command line parameter to disable the conversion cache for actions that are executed silently. That way
automated actions don’t clutter up the conversion cache.
PowerGREP Conversion Manager
If you run more than one PowerGREP instance at the same time, the conversion cache is automatically
shared between all instances. PowerGREP’s conversion manager handles this in the background. While one
or more instances of PowerGREP is running, an application called PowerGREPConversionManager.exe will
be running in the background. When you close the last PowerGREP instance, the conversion manager closes
automatically.
If you set both the ´runningµ and ´not runningµ cache sizes to zero, then the conversion manager is not used
at all.
38
198
32. Archive Formats Preferences
PowerGREP supports a wide range of compressed file formats. You can configure how PowerGREP should
deal with them in the Archive Formats section of the Preferences screen.
Compressed File Formats Supported by PowerGREP
These are the compressed file formats or archive formats that PowerGREP can decompress. You can search
trough files in all these formats. PowerGREP can also create or update some of these archives too. Select the
format you want to configure.
Formats that PowerGREP can decompress, create, and update:
ZIP archives: ZIP format used by PKZip, WinZIP, and a host of other compression utilities. This is
the most popular archive format. PowerGREP uses the original Deflate algorithm for maximum
compatibility when creating ZIP archives.
ZIPX archives: Same as the ZIP format. The .zipx extension is used to indicate that newer
compression methods are used. PowerGREP uses the PPMd algorithm when creating ZIPX files.
7-zip archives: 7z format used by 7-zip. This format yields the smallest files of all the archive
formats that PowerGREP can create.
TAR uncompressed: Uncompressed tarball (.tar file).
TAR GZip archives: Tarball compressed into a GZip file (.tar.gz or .tgz file).
TAR BZip2 archives: Tarball compressed into a BZip2 file (.tar.bz2 file).
TAR XZ archives: Tarball compressed into an XZ file (.tar.xz file).
GZip file: Single file compressed with GZip
BZip2 file: Single file compressed with BZip2
XZ file: Single file compressed with XZ
Formats that PowerGREP can read and write, but which should be treated as document files, even if they are
technically archives:
Zipped documents: Office Open XML (MS Office 2007) and OpenDocument Format
(OpenOffice) are technically ZIP archives containing multiple XML and other files.
47
199
CHM files: HTML Help files consist of compressed HTML files and other files.
Formats that PowerGREP can decompress only:
ARJ archives: Files compressed with ARJ
CAB archives: Microsoft Cabinet
DEB packages: Debian Linux installation packages
FAT images: Disk images of FAT volumes such as floppy disks
ISO and UDF images: CD and DVD images
LHA and LZH archives: Files compressed with LHARC
RAR archives: Files compressed with WinRAR
RPM packages: Red Hat Linux installation packages
WIM images: Windows Imaging disk images
XAR archives: Files compressed with XAR
File Masks
Enter a list of file masks, delimited by semicolons, that match the files that should be treated as files of the
selected compressed file format.
Use IFilter to Decode The Compound Document into Plain Text
If this checkbox is enabled, then the compressed file format you’ve selected in the list is technically a
compressed file holding multiple data files inside it, but conceptually a single document file.
Turn on this option to have PowerGREP use the IFilter installed on your computer to decode files of this
type into plain text. Depending on the IFilter you have installed, this will enable PowerGREP to search
through the document’s text as it would appear in the applications that support these file formats.
PowerGREP cannot make changes to files decoded with IFilters. If you don’t have an IFilter installed for
these files, then PowerGREP ignores this option.
Turn off this option to have PowerGREP decompress the files inside the compressed file, and search
through those, as if the file was an ordinary archive. PowerGREP can also modify files in zipped documents
this way.
You should turn on this option, unless you are familiar with the file format, and you want to work with the
documents at a low level.
Document Files That Use Archive File Formats
Some modern document formats are technically .zip archives, though people see them as documents.
Microsoft Office Open XML files(*.docx, *.xlsx), XML Paper Specification files(*.xps) and OpenDocument
Format files (OpenOffice files and LibreOffice files; *.odb, *.odc, *.odf, *.odg, *.odi, *.odm, *.odp, *.ods and
*.odt) are all technically .zip archives containing one or more XML files and other supports files (such as
image files). However, those XML and image files logically constitute one document, unlike unrelated XML
files that you might store in a .zip archive.
44
200
Therefore, PowerGREP treats such compressed file formats as documents. They ignore the Search Archives
option in the File Selector menu. File masks in the File Selector will affect the document file itself, and not
the XML and image files that are technically inside the document. So you can include or exclude MS Word
2007 files from your search by typing *.docx in the Include Files or Exclude Files box in the File Selector.
Whether the .docx file is included or excluded determines whether all or none of the XML files inside it will
be searched through.
If you turn on the IFilter option, and you have an IFilter installed, then PowerGREP uses the IFilter to create
a single file with a plain text representation of the document. That plain text representation is what
PowerGREP searches through and what it shows in the Editor if you open the file. Office 2007 includes
IFilters for all its file formats. OpenOffice and LibreOffice include IFilters for OpenDocument Format files.
We have successfully tested PowerGREP with OpenOffice 4.1.0 and LibreOffice 4.2.4. OpenOffice 3.x.x
does not correctly install the IFilter, making it unusable by PowerGREP (or any other application).
If you turn off the IFilter option or no IFilter is available, then PowerGREP searches through the individual
XML files that the document consists of and show the XML code in the search results or the built-in editor.
If you work with other file formats that are conceptually documents, but technically zip archives, you can add
their extensions to the ´zipped documentsµ file masks in the Archive Format Preferences.
Examples: Search through printable content in Word .docx files, Search through printable content in XPS
files and Search through printable content in OpenDocument Format files
Self-Extracting Archives
If the .exe files you’re working with are actually self-extracting archives, you can add *.exe to the file masks of
the archive format that was used to create the self-extracting archives. E.g. if you used the WinZIP self-
extractor, add *.exe to the file masks for ´ZIP archivesµ. If you used the SFX option in WinRAR or 7-zip,
add *.exe to ´RAR archivesµ or ´7-zip archivesµ.
You can add each file mask to only one of the compressed file formats supported by PowerGREP. If you add
*.exe to more than one format, only the first format in the list that you added it to will be used for .exe files.
Since *.exe matches all executable files, PowerGREP will attempt to open all of them as archives, which can
slow down your search.
There is no option to make PowerGREP attempt all the archive formats that support self-extracting archives
on each .exe file. Though doing so makes sense for a decompression tool that only needs to open a few
archives at a time. But if a PowerGREP search includes thousands of .exe files that aren’t archives, testing
them for each archive format would slow down your search significantly.
When working with self-extracting archives in different formats, or if you also want to run binary searches
through .exe files that aren’t self-extracting archives, then you need to use more specific file masks. Just like
the File Selector, PowerGREP’s preferences support file masks with folder names. If your self-extracting
archives created with WinZIP are in a folder called ´zipsµ and those created with WinRAR are in a folder
called ´rarsµ, add
*zips\*.exe
to the file masks for ZIP archives and
*rars\*.exe
to the file masks for
RAR archives. Then PowerGREP tries to open .exe files in any folder called ´zipsµ or its subfolders as ZIP
archives and .exe files in any folder called ´rarsµ or its subfolders as RAR archives. Executable files outside
these two folders won’t be treated as archives at all.
C# Word - Paragraph Processing in C#.NET Add references: C# users can set paragraph properties and create content such as run, footnote, endnote and picture in a paragraph.
add signature image to pdf acrobat; how to add image to pdf in preview
31
201
Even if your self-extracting archives always use the same file format, if you can use a file mask such as
*zips\*.exe
to differentiate archives from regular .exe files, by all means do so. This ensures PowerGREP
does not waste time needlessly trying to open regular .exe files as archives.
Archive Formats Using The Same Extension
You can add each file mask to only one of the compressed file formats supported by PowerGREP. If a file
matches the file masks of two archive formats, PowerGREP only tries the first one in the list of archive
formats. This can be a problem if some of your archives use the same file extension for different kinds of
archives.
Both Java and the Konquerer web browser use the .war extension for "web archives". Java .war files are
technically .zip files while Konquerer .war files are technically .tar.gz files. PowerGREP’s default preferences
include the
*.[ejw]ar
file mask for the ´ZIP archivesµ compressed file format. That means it tries to
open .war files as if they were .zip files, which will succeed with Java archives and fail with Konquerer
archives.
If all your .war files are Konquerer archives, you can easily change the file masks for ZIP archives to
*.zip;*.[ej]ar;*.xpi
and those for TAR GZip to
*.tgz;*.tar.gz;*.war
. If you have a mix of
both, you’ll need to come up with file masks that differentiate the two.
The file masks that you can use in the preferences are just as flexible as the file masks in the File Selector. If
your Java archives are in a folder ´javaµ or subfolders thereof, and your Konquerer archives are in a folder
´linuxµ or subfolders thereof, you can use the file masks
*java\*.war
and
*linux\*.war
to separate
them.
13
202
33. Action Preferences
In the Action section in the Preferences screen, you can configure some aspects of the appearance of the
Action panel and the way PowerGREP executes actions.
Search Term Editors
The Action panel shows one or more edit boxes for entering search terms. Most of the settings for these edit
boxes are combined into a ´text layoutµ. If you have previously configured text layouts in the Results or
Editor sections of the preferences, you can select a previously configured text layout from the drop-down list.
If not, click the Configure Text Layout button to specify font, text direction, cursor behavior, word selection
options, extra spacing, etc.
Visualize Spaces and Tabs
Turn on to visualize spaces as small dots, and tabs as chevrons. Turn off to display spaces and tabs as
invisible whitespace.
35
203
Visualize Line Breaks
Turn on to show a symbol for each hard line break in the file. This makes it easy to differentiate between
permanent line breaks and automatic word wrapping as well as different line break styles. CRLF indicates
Windows-style line breaks and LF indicates UNIX-style line breaks.
Action Execution Options
PowerGREP recognizes a number of match placeholders and path placeholders. Match placeholders allow
you to insert search matches and search match numbers. Path placeholders are substituted with various parts
of the name and path of the file being searched through. If the placeholders conflict with text you’re
searching for, you can disable them here. PowerGREP will then treat the placeholders as any other literal text.
When PowerGREP creates or modifies a file, PowerGREP will set the last modification date of the new or
modified file to the current date and time. If you turn on the option ´give target files the same time stamp as
the source fileµ, each target file will be given the same last modification date as the source file it is based on.
The source file is the file that was searched through by PowerGREP.
The option ´delete files to the Windows Recycle Binµ controls how files are deleted when you set the target
type of a ´list filesµ action to "delete matching files". When you turn on the option, PowerGREP will try to
move the files to the Windows Recycle Bin. Moving files to the recycle bin is a slow operation, and does not
reclaim disk space. It does make it possible to recover mistakenly deleted files. If you turn off the option, or if
some files cannot be placed into the recycle bin, the files are deleted permanently. Permanently deleted files
cannot be recovered, and the disk space they used is reclaimed.
Overwrite Files That Have The Read-Only Attribute Set
Turn off to make PowerGREP respect the read-only attribute. Attempting to overwrite a file with the read-
only attribute set will result in an error.
Turn on to make PowerGREP override the read-only attribute. If a target file exists and has the read-only
attribute set, PowerGREP will remove the attribute, overwrite the file, and set the attribute again.
This option only applies to the read-only attribute. If a file is read-only because it is locked by another
application or because you do not have the security privileges to overwrite the file, then attempting to
overwrite it will result in an error regardless of the choice you made for this option. PowerGREP can only
remove the read-only attribute if your security privileges allow you to do so.
Multi-Threaded Execution
The settings in this section are important if your computer as a multi-core CPU. All modern computers have
dual core CPUs and quad core is becoming increasingly common. PowerGREP can use all the CPU cores
your computer has to speed up searches by searching through multiple files at the same time. There is a trade-
off though. If you allow PowerGREP to use all your CPU cores, other applications may slow down
significantly, particularly if your hard disk can’t keep up.
38
204
Minimum number of execution threads
If your computer has more than one CPU or a multi-core CPU, you can tell PowerGREP to search through
multiple files in parallel. If you set this number higher than 1, PowerGREP will search through as many files
as you specified in parallel, even if they are on the same drive. Increase this number to speed up searches
using complex regular expressions that are limited by CPU speed rather than by disk or network speed.
Decrease this number when running PowerGREP in the background, so it doesn’t starve other applications
for CPU time. Set this to 1 and turn on the two checkboxes below if most of your actions are simple searches
that are limited by disk speed rather than CPU speed, so it doesn’t starve other applications for disk access.
The maximum setting is the number of CPU cores in your PC. The default setting is one less than that. The
default maximizes PowerGREP’s performance while making sure other applications and PowerGREP itself
remain responsive by leaving one CPU core for other tasks.
Use a Separate Thread for Each Drive Letter
Turn on if the drive letters on your computer represent separate physical disks. When searching through files
on multiple drives, PowerGREP will process the drives in parallel to speed up the search. If you have many
drive letters, PowerGREP may use more threads than the minimum you specified. Turn off if the drive letters
on your computer represent partitions on a single physical disk. Searching through files on different partitions
on the same disk in parallel may slow down the search. Mechanical hard disks perform very poorly if they
have to access multiple files on different partitions simultaneously. SSD drives (flash-based hard disks) do not
have that limitation.
Use a Separate Thread for Each Network Share
Turn on if the servers on your network are slow. When searching through files on multiple network shares,
PowerGREP will process the shares in parallel to speed up the search. When searching through files on many
shares, PowerGREP may use more threads than the minimum you specified. Turn off if the servers on your
network are fast enough to send data to your PC faster than your PC can receive it.
Folder to Use for Temporary Files
PowerGREP uses temporary files for many things. This way PowerGREP can work with arbitrarily large files
without running out of memory. If the drive on which Windows is installed (the C: drive) isn’t the fastest
drive on your computer, tell PowerGREP to use a specific folder on another drive to save its temporary files.
PowerGREP does not use this setting for preparing target files that you want it to save on a local hard disk.
Those temporary files are created in the destination folder of the target file. That allows PowerGREP to
instantly replace the target with the temporary file instead of having to copy it around.
Smaller temporary files can be kept in memory without saving them to disk. You can choose how much of
your PC’s RAM PowerGREP is allowed to use for temporary files. Allocating more RAM speeds up actions
that need a lot of temporary files, such as searching through compressed archives, but leaves less memory
available for other applications. The memory limit is for each instance of PowerGREP. If you run multiple
PowerGREP instances at the same time, reduce the limit so your PC has enough actual RAM for all
PowerGREP instances.
17
205
34. Text Layout Configuration
In PowerGREP, a ´text layoutµ is a combination of settings that control how an edit control displays text and
how the text cursor navigates through that text. The settings include the font, text direction, text cursor
behavior, which characters are word characters, and how the text should be spaced. You can select a text
layout for the edit boxes on the File Selector, Action, Library, and Sequence panels in the Action section of
the Preferences or via the Font and Text Direction submenu in the right-click menu of the search term boxes
on the Action panel. You can select a different text layout for the Results panel in the Results section of the
Preferences or via the Font and Text Direction item in the Results menu. The Editor panel also uses its own
text layout, which you can configure in the Editor section of the Preferences or via the Font and Text
Direction item in the Editor menu. Finally, you can configure the text layout of the message editor on the
user forum in the General section of the Preferences.
Though you can select four different text layouts for different parts of PowerGREP, all four parts offer the
same set of preconfigured text layouts. So you can easily make them use the same layout by picking the same
preconfigured layout for all of them. You change the preconfigured text layouts via any of the Configure Text
Layout buttons in the preferences or the Configure Text Layout item at the bottom of the Font and Text
Direction menu items. When you do this the following screen appears.
Documents you may be interested
Documents you may be interested