Now that we have generated a mostly-complete mapping.csv and found corrected most of the broken links in missing.csv, we are ready to use the mapping to quite simply iterate over each of the rows in the spreadsheet, locate the file named in the first column and rename it (creating intermediate folders along the way) to the second column.
This can be done just using bash scripting, and although the Python script should prevent this, we should throw errors in case we try to rename a file to something that already exists.
Now that we have generated a mostly-complete
mapping.csv
and found corrected most of the broken links inmissing.csv
, we are ready to use the mapping to quite simply iterate over each of the rows in the spreadsheet, locate the file named in the first column and rename it (creating intermediate folders along the way) to the second column. This can be done just using bash scripting, and although the Python script should prevent this, we should throw errors in case we try to rename a file to something that already exists.