`

change encoding of folder recusively

阅读更多

use shell to change encodeing of files under a folder recusively,

the script use a tool called "enca", install it if not yet,

there will be error info during execution, ignore that, it doesnot matter,

 

 

encode_util.sh:

#! /bin/bash

# change encode of files to utf8 recusively
# 
# how to use:
# 	way 1:
# 		just call:
# 			encode_util.sh path
# 	way 2:
# 		modify the "default_path" variable first,
# 		then call:
# 			encode_util.sh
# 



# the default folder to be encoded recusively,
default_path="/media/ERIC_/knowledge/hardware/single chip/R2_disk"

# encode files in a folder, recusively,
do_encode() {
	base_dir="$1"
	do_encode_no_recu "$base_dir"

	for sub_dir in "$base_dir"/*;do
		if [ -d "$sub_dir" ];then
			do_encode "$sub_dir"
		fi  
	done
}

# encode files in a folder, not recusively,
do_encode_no_recu() {
	cd "$1"
	pwd
	enca -r -L zh_CN -x utf-8 *
}

# try get path from param
path=""
if [ -d "$1" ]; then
	path="$1";
else
	path="$default_path"
fi

echo "base path: $path"

do_encode "$path"

 

分享到:
评论

相关推荐

    Folder change monitor

    Folder change alarm and detect including file size, file sub-directory, create file

    Change_Folder_Icon.rar

    修改任何文件图标 独一无二的将平凡朴素的标准文件夹图标转变为其它找到的亮丽多彩的图标的工具

    Change Folder Icons v8.1

    软件介绍 允许您在计算机中查找成千上万的图标并简单快捷地更改Windows文件夹图标 Tags: Change Folder Icons

    Folder2MyPC

    - Addition / change / removal of any folder and programs in a folder "My Computer" and "Control panel", - A choice of type of a created shortcut: the Explorer opened in the same window or in new, - An...

    Folder Size 2.1 Folder Size 2.1

    Test Folder Size 2.1 Folder Size 2.1

    change_xml_dafult_folder.py

    完整代码的change_xml_dafult_folder.py,按照自己的需求、和文件格式直接使用即可。

    windows-folder-remark-master.zip

    windows-folder-remark-master.zip windows-folder-remark-master.zip windows-folder-remark-master.zip windows-folder-remark-master.zip windows-folder-remark-master.zip windows-folder-remark-master.zip ...

    CPL theme_folderandfile_controlpanel_

    this source created with delphi7 and used to change theme of folder and file

    Easy Lan Folder Share

    You just select the "Share Mode" to "Easy Share" only once, our software will save your setting until next change, you may need to restart your computer to take effect. the last thing you need to do ...

    kill_folder 专杀

    kill_folder 专杀文件病毒,特好用 kill_folder 专杀文件病毒,特好用

    FolderSniffer.exe

    FolderSniffer.exe FolderSniffer.exe

    Advanced Folder Encryption 6.60

    The program can encrypt, lock, and password protect all of your folders and files all at the same time quickly and easily. The program integrates with Windows Explorer so you can enable decryption, ...

    Microsoft Private Folder 1.0

    Microsoft Private Folder 1.0又名我的密码箱是一款功能超群的加密软件,它界面友好,简单易用,采用先进的文件系统驱动技术及安全可靠的加密算法,真正意义上的实现了与 Windows文件系统的无缝集成,全面保证加密...

    硬盘文件大小查看对比工具(Folder Size) 3.4 绿色版 很好

    folder Size是最好的一个文件夹大小浏览工具了,可以拖入文件夹,操作方便 folder Size是一款用于系统硬盘查看对比的工具,它可以帮助你查看系统中的磁盘文件使用状态,同时支持显示每个磁盘的文件和文件夹所占用...

    Folder lock v7.7.6.zip

    今天小编要给大家介绍一款专业的文件加密软件——Folder Lock 。Folder Lock 能用密码将您的任何文件、文件夹、驱动器和图片快速进行安全加密,加密速度飞快,被加密的文件不但是隐藏的,而且是无法删除的,软件使用...

    New+Folder+(3)New+Folder+(3)New+Folder+(3)

    New+Folder+(3)New+Folder+(3)New+Folder+(3)New+Folder+(3)New+Folder+(3)New+Folder+(3)New+Folder+(3)New+Folder+(3)

    New version of monitoring a folder. Must see...

    New version of monitoring a folder. Must see...

    FolderSize v2.5

    http://downloads.sourceforge.net/foldersize/FolderSize-2.5-x86.msi http://downloads.sourceforge.net/foldersize/FolderSize-2.5-x64.msi 需要说明一下,该软件目前不支持 Vista 和 Windows7,祝君好运!

    Private Folder-我的密码箱

    Microsoft Private Folder 1.0又名我的密码箱是一款功能超群的加密软件,它界面友好,简单易用,采用先进的文件系统驱动技术及安全可靠的加密算法,真正意义上的实现了与Windows文件系统的无缝集成,全面保证加密...

    folder-lock 7.2.2文件加密软件

    Folder Lock 是一个对所有数据的安全性需求的全套解决方案。它可以让你保持多种方式保护您的个人档案,在PC和便携式硬盘,并提供可选的备份在线存储受保护的文件 。Folder Lock 7安全工具的完美结合,让您加密备份您...

Global site tag (gtag.js) - Google Analytics