Normalize unicode file names (converts UTF-8 NFD to NFC).
Required by macOS clients through AFP/NFS/SMB.
Tested on Synology DSM 6.2 with built-in Python 2.7.12.
# 1. Activate SSH on your NAS
# 2. On your computer, open a new console/terminal and connect to your server:
ssh [email protected]
# 3. Go to the directory where you want saving the `nfcfn.py` script:
cd /volume1/YourSharedFolder/PathToScript
# 4. Download the latest version:
wget https://gist.githubusercontent.com/xthezealot/9a65fac2c7b916c4d84e66188bf06bec/raw/nfcfn.py
# 5. Run it with Python to check the result:
python nfcfn.py -cr /volume1/YourSharedFolder
# 6. When you are sure, add the `-p` flag to effectively rename the files:
python nfcfn.py -crp /volume1/YourSharedFolder
Please help. I get this error:
Traceback (most recent call last):
File "/volume1/homes/Wenner Peter/Drive/Script/nfcfn.py", line 82, in
main()
File "/volume1/homes/Wenner Peter/Drive/Script/nfcfn.py", line 67, in main
if isfile(args.source):
File "/usr/lib/python2.7/genericpath.py", line 37, in isfile
st = os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 37: ordinal not in range(128)
i want to run this in synology task scheduler daily
which python should i install?
in the package center i see:
Community:
Any suggestion?