NB: THIS IS ALTERING YOUR DATABASE /AND/ YOUR FILENAMES AND CAN POTENTIALLY DESTROY YOUR DATABASE /AND/ FILESTRUCTURE! ONLY ATTEMPT IF YOU UNDERSTAND WHAT THE COMMANDS DO! AND KEEP A BACKUP HANDY! 1) Rename all files from the command line. This replaces all spaces with underscore the current folder and all subdirectories. Execute it repeatedly until no error message appears (the error message appear because folders are renamed before subfolders) ,---- | find . -regex ".* .*" -exec rename \ _ {} \; `---- 2) Start sqlite3 in a shell (insert your db path!) ,---- | sqlite3 /path/to/digikam.db `---- 3) Replace space with underscore in the database ,---- | update albums set | relativePath= replace(relativePath, " ", "_") | where | relativePath like "% %"; `---- 4) Done! Start digikam and find nicely renamed albums.