Copyright MonkeyJob Systems 2005
All rights reserved

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

What does this feature do?

The following tutorial will demonstrate using FileMonkey to find and delete target files only if their contents or names contain specific text.

For example, you could use this feature to delete all target files that contain the text "toaster" in their bodies or names.

How do I delete all files with file NAMES that contain specific text?

If you wish to delete all files with file NAMES that contain specific text, target the required files in the main window and use the "Quick-Find, Delete" menu item from the FileMonkey main window to delete these files.

To target these files, you will need to enter a file pattern filter. For example, if you want to delete all files with NAMES that contain the word "toaster", enter a file pattern filter of *toaster*

How do I delete all files with file bodies (contents) that contain specific text?


Target your files in the main window. Click HERE for a targeting tutorial.


Once you have targeted your files, select the "Quick-Find, Command Line" menu item from the main window.


The Create/Run batch file window should now be open

make batch jobs

delete files contain

Load Script


From the menu bar at the top of this window, select the "File / Load Code" menu item.


This will open the load file dialogue box.

Use this box to navigate to the folder that FileMonkey is installed in (This is usually something like: C:\Program Files\FileMonk)

Select the file Delete Files That Contain.FM and click the "Load" button.


Next, you need to enter the search phrase. The search phrase cannot contain quote marks or carriage returns and must be less than 255 characters in length.

For example, if you want to use a search phrase of "toaster", find the following line in the "Head" code section:

set SerStr="hello"

and replace it with the line:

set SerStr="toaster"

delete copy job


Next, you will need to specify the location of the FileMonkey dos find module. This module is provided with the FileMonkey installer. You will find it in the folder that FileMonkey is installed in. Typically, this will be:

C:\Program Files\FileMonk\DOSFIND.exe

You will need to check if this module is present. If you have installed FileMonkey in a different location then you need to edit the following line in the "File" code section:

start /w "" "c:\program files\filemonk\dosfind.exe" "<myDosFold><myDosFile>" %SerStr%

The above line should reflect the location of DOSFIND.exe. If you need to edit this line, make sure that you preserve the surrounding quote marks.

create copy job


To start the operation, select the "File/Compile And Run" menu item.
Related Topics:
Copy or move files that contain keywords
FileMonkey Tutorials
Frequently Asked Questions

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