0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macで日本語を含む大量のShift_JISファイルの文字列置換をする

Posted at

Macで日本語を含む大量のShift_JISファイルの文字列置換をするというシチュエーションで、色々やった結果Antスクリプトだうまく言ったので、xmlを残しておきます。

build.xml
<project name="SJIS replace" default="rep">
	<property name="source.dir" location="/foo/targer-dir" />
	<target name="rep">
		<replace dir="${source.dir}" encoding="Shift_JIS">
			<include name="**/*.*" />
			<replacetoken>変更前文字列</replacetoken>
			<replacevalue>変更後文字列</replacevalue>
		</replace>
	</target>
</project>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?