public void savePages(string backupFolder, string targetFolder, List <string> pages, string mappingsFileName) { string pageMappings = ""; "there are: {0} pages to save".info(pages.size()); Status_ProgressBar.maximum(pages.size()); Status_ProgressBar.value(0); foreach (var page in pages) { if (CancelBackup) { "In savePages, CancelBackup was set, so aborting backup".error(); break; } pageMappings += "{0} {1}".format(page, page.base64Encode()).line(); var saveFileName = "{0}.wikitext.txt".format(Files.getSafeFileNameString(page)); WikiApi.raw(page).saveAs(targetFolder.pathCombine(saveFileName)); Status_ProgressBar.increment(1); } pageMappings.saveAs(backupFolder.pathCombine(mappingsFileName)); }