I have old samba server files that does not show special characters like ä,ö,ü,õ in file names. They are showed as ? mark. Because of that my clients cannot open those files or folders. They see the files and folders, but their names are blank. In server they are showed like this: T??tunnid.doc for example.
Once I rename them with mv command, then my clients can open the folders and files with no problems.
Does anyone know any script that I can use to rename all the files that have ? mark in them. So they show - instead. I would like to rename the files in specific folder for example /samba/documents/...
You can try to use convmv which rename files changing it character encoding. Usually this symbols ? says about different encoding of filenames and terminal/filesystem/something else. Try to determine which character encoding your files use and run it like this:
convmv -fcp1251 -tutf8 *
You can write simple script or just shell loop to iterate over directories and rename all needed files:
find /full/path -execdir convmv --notest -fcp1251 -tutf8 {} \;
But first be sure you use correct character encoding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With