If you want to prompt the user to pick a folder then I suggest using FDlog's OpenPath method.
FDlog.Reset();
FDlog.DlgName$="Choose a folder for PDF files";
FDlog.OpenPath();
%a=;
If you want to change the default path for all images then call FDlog's UseGroup method before calling OpenPath.
FDlog.Reset();
FDlog.DlgName$="Choose a folder for image files";
FDlog.UseGroup(image);
FDlog.OpenPath();
%a=;