Skip to content

Instantly share code, notes, and snippets.

@myokoym
Created August 2, 2012 14:55
Show Gist options
  • Save myokoym/3237623 to your computer and use it in GitHub Desktop.
Save myokoym/3237623 to your computer and use it in GitHub Desktop.
ファイルリネーム用ワンライナー
ruby -r fileutils -e "Dir.glob('*').each_with_index {|fn, i| FileUtils.mv fn, fn.sub(/置換前/, \"置換後\") }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment