Copyright MonkeyJob Systems 2005
All rights reserved

Home FAQ Forums Contact
Download Tutorials FAQ Awards Reviews Report Bugs
 Search For Data

Search and replace from the command line

FileMonkey cannot directly perform search and replace from the command line. For this reason, we have created a separate search and replace utility that we distribute with FileMonkey free of charge.


Although called from the command line, this utility can only be run under a Windows operating system.

The utility is called DOSSR.exe and you can find it in the folder that you have installed FileMonkey in (usually something like: C:\Program Files\FileMonk\DOSSR.exe)

When placed on the command path, the utility can be called like so:

DOSSR "full path of file" "search phrase" "replace phrase"

For example:

DOSSR "c:\my documents\my text file.txt" "hello" "goodbye"

You may also explicitly call the module like so:

c:\progra~1\filemonk\dossr.exe "hello" "goodbye"

or like so:

start/w c:\progra~1\filemonk\dossr.exe "hello" "goodbye"


The module sets the errorlevel variable to 0 on success and 1 on failure.


  • The module should not be used on files larger than 1 MB
  • Parameters cannot contain quote marks (except encompassing)
  • There is no support for wildcards
  • There are no case sensitive options


FileMonkey comes equipped with a much more powerful search and replace engine however, DOSSR has the advantage of being called from DOS, something that FileMonkey does not support.

Where possible, it is best to use the in-built FileMonkey search and replace feature.

Related Topics:
FileMonkey Tutorials
Frequently Asked Questions
Replacing text within files with file name or other text
Search and replace on file names example
Search and replace on file contents example
Search for information (without replacing)

  | About Us | Privacy Policy | Terms Of Use | Affiliates | Forums | Copyright 2003 MonkeyJob Systems All Rights Reserved |