Is there a way to create an if-else scenario?

For example, with PlayStation games most of the time a .cue file is required and if multiple CDs are involved, a .m3u file helps with the switching of the CDs.

What I want to know is if there is a way to specify .cue files in the files section only if user selects the option that it has those files, thus allowing us to transfer those files in the installer section, otherwise allowing us to create the files by using write_file command.

Also, if the files have to be created, is there a way to get only base filename (without path) for files specified in the files section? It would be very helpful in the write_file command to be able to specify only filenames not full path