Do you want to just select a folder with the UI to put all the files in or do you want to have the save as dialog box come up each time you save a file or both? To have the saveas dialog box appear, you just do something like this:
var docRef = activeDocument;
var jpgOptions = new JPEGSaveOptions();
jpgOptions.quality = 8
app.displayDialogs = DialogModes.ALL;//turns on dialog box
docRef.saveAs (new File('filepath_and_name'), jpgOptions)
app.displayDialogs = DialogModes.NO;//turns off dialog box