Move all files with same extension at once in ruby
ruby, ruby-on-rails
Solution
You can do:
FileUtils.mv Dir.glob('*.sql'), '/some/output/dir/'
Problem
In terminal i could have used something like: ``` mv *.ext /some/output/dir/ ``` I want to so the same in ruby. I can use system command for that under backticks (`) or using the system(), but how to achieve the same in ruby way? I tried: ``` FileUtils.mv '*.sql', '/some/output/dir/' ``` This is not working as it looks specifically for a file name '*.sql'