2

【笔记】修复GBK编码的文件名

 1 year ago
source link: https://feiju12138.github.io/2022/05/14/%E4%BF%AE%E5%A4%8DGBK%E7%BC%96%E7%A0%81%E7%9A%84%E6%96%87%E4%BB%B6%E5%90%8D/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

【笔记】修复GBK编码的文件名

2022-05-14

1

利用Automator,编写一个修复GBK编码的文件名脚本

for f in "$@"
do
dirName=$(dirname $f)
newName=$(echo "$(basename $f)" | iconv -f UTF-8-MAC -t L1)
pointName=${f##*.}
fullName=$dirName"/"$newName"."$pointName
mv $f $fullName
done

少数派——涔C
CSDN——bandaoyu
CSDN——RadiantJeral
CSDN——RonnyJiang


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK