acceptfile modified to accept dynamic folder and file names.