base:wiki_file_normalisation
Wiki such as DokuWiki is fussy about how filenames are formatted. Spaces, UPPERCASE are all out. Processing a large number of files and directories can be time intensive so we'll use bash to do it for us.
First we'll change all directories and files with spaces in to have - instead.
find ./ -name "* *" -print0 | sort -rz | while read -d $'\0' f; do mv -v "$f" "$(dirname "$f")/$(basename "${f// /-}")"; done
Then we will rename all the upper case to lower case
reanem_all_files_to_lower_case_names_recursively
Finally we'll remove any files we don't want.
/home/gen.uk/domains/wiki.gen.uk/public_html/data/pages/base/wiki_file_normalisation.txt · Last modified: 2019/07/09 10:28 by genadmin