Stefans Tools

Useful open source tools that make your life easier

Command line parameters for grepWin

ParameterDescription
/help, /?, /aboutshows the about dialog
/portablestores ini settings file in the same directory as the one in which grepwin.exe resides
/searchpath:"path"sets the path to search in
/searchfor:"regex or text"fills the regex to search with
/regex:[yes|no]sets whether the /searchfor text is a regex or normal text, default is regex
/searchini:"path/to/inifile"

specifies an ini file which contains all the values usually passed on the command line

you can use sections to specifiy different sets of commands. To specify which section is used, pass the /name:"sectionname" argument

the entries in the ini file are named the same as the command line arguments

searchpath=d:\work|d:\documents
regex=yes
filemask=*.txt
searchfor=this(is)what[I]want(?to)search|for
[CodeSearch]
searchpath=e:\sourcecode
filemask=*.cpp|*.h|*.cs|*.java
searchfor=this(is)what[I]want(?to)search|for
i=yes

the ini file must be saved in utf8 format

/nosavesettingsprevents grepWin from saving any of the settings/history items.
ParameterDescription
/filemaskregex:"regex"sets the file mask as a regex
/filemask:"string"sets the file mask
/direxcluderegex:"string"sets the exclude dirs regex mask
/replacewith:"string"sets the replace-with string
/execute /executesearchif specified, the search is started immediately without the user having to click the search button first
/executereplaceif specified, the replace is started immediately without the user having to click the replace button first . Note: if /k is not specified, grepWin will ask whether to do the replace without creating backups.
/closedialogcloses the dialog after the command has finished.
/i:[yes|no]case insensitive
/n:[yes|no]dot matches newline
/k:[yes|no]create backups
/utf8:[yes|no]treat files as utf8
/size:sizelimitsets the file size limit. Pass -1 to use all sizes
/sizecmp:[0|1|2]compare setting for the size limit: 0 = less than, 1 = equal to, 2 = greater than
/s:[yes|no]include system items
/h:[yes|no]include hidden items
/u:[yes|no]include subfolders
/b:[yes|no]include binary files
/contentif set, the search results are listed by content instead of files
/preset:"name"if set, uses the settings from the named preset
/datelimit:[0|1|2|3]Sets the date filter:
  • 0 : No date filter
  • 1 : Search for files newer than
  • 2 : Search for files older than
  • 3 : Search for files between date
The date(s) are set with /date1:"YYYY:MM:DD" and /date2:"YYYY:MM:DD".