One thing you'll want to keep in mind is exactly how the format of the number part of the file name will look, as this can sometimes affect the ordering of the files in the directory. For example, using the naming convention you give above will sometimes result in a sort order like this:
image1.jpg
image10.jpg
image11.jpg
image2.jpg
image3.jpg
...
This isn't generally what you would want. If you instead pad the number with zeroes up to the maximum number size (in your case 5 digits), the sort order should be maintained better in the directory:
image00001.jpg
image00002.jpg
image00003.jpg
....
To create file names like this, you can use the SPRINTF function. Here's some sample code that renames all the .jpg files in a directory in this way:
dirData = dir('*.jpg'); %# Get the selected file data
fileNames = {dirData.name}; %# Create a cell array of file names
for iFile = 1:numel(fileNames) %# Loop over the file names
newName = sprintf('image%05d.jpg',iFile); %# Make the new name
movefile(fileNames{iFile},newName); %# Rename the file
end
The above code also uses the DIR and MOVEFILE functions (as mentioned in the other answers).