It would be useful to know what vertion of Photoshop you are using.
If you are using PSCS2 PSCS3 the following code would do a whole directory of GIFs.
save the code to a file with a jsx extention to your scripts folder ie:- Gif2Jpg.jsx
pscs2
C:\Program Files\Adobe\Adobe Photoshop CS2\Presets\Scripts
pscs3
C:\Program Files\Adobe\Adobe Photoshop CS3\Presets\Scripts
To run the script Open Photoshop then
File - Scripts - Gif2Jpg
//Save all GIF files in selected folder as Save For Web jpg files.
var imageFolder = Folder.selectDialog("Select the folder with GIFs to process");
if (imageFolder != null)
{
var fileList = imageFolder.getFiles("*.gif")
for (var i = 0; i < fileList.length; i++)
{
if (fileList instanceof File)
{
open(fileList);
var doc = app.activeDocument;
var docName = app.activeDocument.name.slice(0,-4) + ".jpg";
SaveForWeb(doc.path + "/" + docName),
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
}
}
}
function SaveForWeb(JpgFile) {
var sfwOptions = new ExportOptionsSaveForWeb();
sfwOptions.format = SaveDocumentType.JPEG;
sfwOptions.includeProfile = false;
sfwOptions.interlaced = 0;
sfwOptions.optimized = true;
sfwOptions.quality = 60; //0-100
doc.flatten();
doc.exportDocument(new File(JpgFile), ExportType.SAVEFORWEB, sfwOptions);
}