Yes as per the CommonsWare comment you can use EXTRA_OUTPUT like this:
private void capturePhoto() {
File root = new File(Environment.getExternalStorageDirectory(), "Folder");
if (!root.exists()) {
root.mkdirs();
}
File file = new File(root, "filename.jpeg");
Uri outputFileUri = Uri.fromFile(file);
Intent photoPickerIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
photoPickerIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
photoPickerIntent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
photoPickerIntent.putExtra("return-data", true);
startActivityForResult(photoPickerIntent, TAKE_PICTURE);
}