function fnames = RenameFiles

src_dir = 'J:\Research\CVPR10_ori\Dataset\NewWith\NewWith_Erhu\new\';
dst_dir = 'J:\Research\CVPR10_ori\Dataset\NewDataset\annotation\images\With_Erhu\';

fnames = dir(fullfile(src_dir, '*.jpg'));
num_files = size(fnames, 1);
iniNum = 2000;

for i = 1 : num_files
    im = imread([src_dir fnames(i).name]);
    imwrite(im, [dst_dir, sprintf('000%d%d%d%d.jpg', floor((iniNum+i) / 1000), ...
        floor(mod((iniNum+i),1000) / 100), floor(mod((iniNum+i),100) / 10), ...
        floor(mod((iniNum+i), 10)))]);
end