The process of picking file path substitutions is quite error prone, with users having to get things like trailing slashes correct; deal with the appropriate prefix (file:) and the right number of slashes following it; and get the direction of slashes correct, especially when the OS being used (e.g. Windows) isn't the same as what created the CSV file (e.g. Mac).
I'm proposing that we have a new button/mode which simplifies this process, at least for a common use case which is changing the location of the files for TNA transfers. Ideally the solution could be made as generic as possible to work in other cases too, but dealing with this basic case will be the priority.
In the CSV file, there will be a column with file paths. This is normally called 'identifier' which could be the default, but can this be changed somehow if needed (i.e. picking from a list). Ideally this doesn't introduce another unnecessary user step for the simplest case, so maybe only provide a picker if there isn't a column called 'identifier' which passes some simple test (e.g. begins "file:")
In this field, one row will be shorter than the rest, as it's the top level folder. This will normally be the batch folder that we want to substitute. Or we could possibly match on the 'content' folder by finding the shortest path that contains 'content'. We can explore options here.
The user should be offered a file picker where they are told the folder name they are looking for (e.g. "content" or the batch folder) and they would navigate to where the current location of this folder is, and pick the folder. The file path substitution will automatically be calculated.
We can do a worked example below, and explore the options about whether it's simplest to match on batch folder or 'content'. Current users such as TNA Digital Archivists will know whether we always have a batch folder or are sometimes matching into a bare content folder. I would suggest that matching on the shortest row folder (i.e. batch) will be more generic if it works, and avoids a further hardcoding to 'content' which is error-prone within this app.
The process of picking file path substitutions is quite error prone, with users having to get things like trailing slashes correct; deal with the appropriate prefix (file:) and the right number of slashes following it; and get the direction of slashes correct, especially when the OS being used (e.g. Windows) isn't the same as what created the CSV file (e.g. Mac).
I'm proposing that we have a new button/mode which simplifies this process, at least for a common use case which is changing the location of the files for TNA transfers. Ideally the solution could be made as generic as possible to work in other cases too, but dealing with this basic case will be the priority.
We can do a worked example below, and explore the options about whether it's simplest to match on batch folder or 'content'. Current users such as TNA Digital Archivists will know whether we always have a batch folder or are sometimes matching into a bare content folder. I would suggest that matching on the shortest row folder (i.e. batch) will be more generic if it works, and avoids a further hardcoding to 'content' which is error-prone within this app.