var
savefile=
new
File(
"~/Desktop/exp.psd"
);
exportOptions =
ExportOptionsPhotoshop();
exportOptions.writeLayers =
false
;
app.activeDocument.exportFile(savefile, ExportType.PHOTOSHOP, exportOptions);