Question: I've mounted the AOE iso and it seems working. But when I start a game, get an error message "You must insert a game CD to play a single player game, and then restart Age of Empires".

Here is what I've done to mount the iso.

```
sudo mkdir /media/iso
sudo cp Age_Of_Empire_1/AgeOfEmpireI.iso /media/iso
sudo mount -t iso9660 Age_Of_Empire_1/AgeOfEmpireI.iso /media/iso -o loop
mount: warning: /media/iso seems to be mounted read-only

```

I dont know whether direct correlation between the setup install directory and the error but this is where the game is installed I think: `C:\Program Files\Microsoft Games\Age of Empires`

Any help would be appreciated.

Answer: 
The solution to the above example, using [rename](http://linux.die.net/man/1/rename):

```
rename -v -n 's/file_\d{1,3}/upl/' file_*.png

```

Usage:

```
rename [options] [Perl regex search/replace expression] [files]

```

From `man rename`:

```
   -v, --verbose
           Verbose: print names of files successfully renamed.
   -n, --no-act
           No Action: show what files would have been renamed.

```

rename MAY take regex as the arguments.

What we are looking at is the content between the single quotes `'`. You can place regex separated by `/`.

Formula: `s/(1)/(2)/` where `(1)` = search pattern, and `(2)` = replace pattern.

So, [familiarize youself with regex](http://www.regular-expressions.info/), and enjoy pattern based batch file renaming!
This can be done with little magic of bash parameter expansion!

```
for f in file_[0-9]*_*; do mv $f upl_${f#file_[0-9]*_}; done

```

`file_[0-9]*_*;` - First pattern is used to go trough all files that begin with 'file\_anynumber\_'  

`${f#file_[0-9]*_}` - The second pattern `file_[0-9]*_` is used in parameter expansion which tells bash to remove 'file\_anynumber\_' from the begging of the string.

For more information on `Parameter expansion`:

```
man bash

```