Copyright MonkeyJob Systems 2005
All rights reserved

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

Appending Text To File Names - command line

The following tutorial will demonstrate how to use FileMonkey to append text to the start of target file names.

Note that this is now more easily done using the "Rename" feature however, we have left this command line tutorial here for completeness.

For example: if a file is named hello.txt then FileMonkey can rename it to _hello.txt (appending the string "_" to the start of each file name)

This will be done using the cmd Line feature (short for: command line)


Target your files. 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 (Fig 1)

Fig 1
make batch jobs


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

Fig 2
load batch script


This will open the load file dialogue box (Fig 2).

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 Append.FM and click the "Load" button.


In the head section, find the following line:

set StartText="StartText"

Fig 3
edit batch script


We have entered the string "StartText" as the default append text (Fig 3). You may want to change this to something else.

Delete the text "StartText" and enter the text that you wish to use here.

You MUST keep the encompassing quote marks otherwise this operation may not work.

For example: If you wish to add an under-score to the start of file names then replace the line:

set StartText="StartText"

with the line:

set StartText="_"

You can also do this for the EndText variable. This will add text to the end of the file name. We only want to add text to the start of each file name so we need to set the "EndText" variable to ""

Change the line:

set EndText="EndText"


set EndText=""


The command line window should now look like Fig 4 below:

Fig 4
append to files


To begin the operation, select the "File / Compile And Run" menu item.

Related Topics:
FileMonkey Tutorials
Frequently Asked Questions
Using Rename to append text to file names
Renaming files using Rename
Renaming files using Search And Replace
Using the command line append script to change file extensions
Using the command line feature to back up files
Using the command line feature to delete empty folders
Using the command line feature to move files
Using the command line feature to unzip many files

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