LoginSignup
9
9

More than 5 years have passed since last update.

FileUtils.cp_r()で*(アスタリスク、ワイルドカード)が使いたい

Posted at

ディレクトリの中身だけコピーしたい時

FileUtils.cp_r("hoge/*","foo/") # これではだめ
FileUtils.cp_r(Dir.glob("hoge/*"),"foo/") #こうすれば同じ結果が得られる
9
9
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
9
9