SabreTools / MPF

Redumper/Aaru/DiscImageCreator GUI in C#
GNU General Public License v3.0
405 stars 34 forks source link

Allow variables in output path #624

Closed Deterous closed 6 months ago

Deterous commented 6 months ago

Attempts to provide a general solution/fix for #458

Type the following keywords into output path or default output path textboxes to use variables: %SYSTEM% = Long name for system %SYS% = Short name for system %MEDIA% = Long name for media type %PROGRAM% = Long name for dumping program %PROG% = Short name for dumping program (currently only DiscImageCreator -> DIC) %LABEL% = Volume Label %DATE% = "YYYYMMDD" current date %DATETIME% = "YYYYMMDD-HHMMSS" current datetime

For now, these are not documented anywhere, but are provided for advanced users.

Deterous commented 6 months ago

I've used < and > as markers as they are invalid windows filename/path characters. However, Path.GetInvalidPathChars() does not currently check against < and > so I have added checks for those in NormalizeOutputPaths

Edit: I have gone back to % as the variable delimiter, it is more well known and it works fine.