LoginSignup
1
6

More than 3 years have passed since last update.

サクラエディタで複数ファイルを置換して保存する

Posted at
  • driver.batがreplace.macを呼び出して、cd c:\work\ReplaceTarget配下に存在するファイルに対して繰り返し置換・保存する。
C:.
│  driver.bat
│  replace.mac
│
└─ReplaceTarget
        hogepiyo.txt
replace.mac
// 置換
S_ReplaceAll('bow-wow', 'miaow', 36);
// 保存
FileSave();
// 閉じる
WinClose();

driver.bat
cd C:\work\ReplaceTarget
for %%a in (*) do (call:method %%a)
exit
:method
"C:\Program Files (x86)\sakura\sakura.exe" %1 -M=c:\work\replace.mac
1
6
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
1
6