Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzoiwasaki authored and yucao24hours committed Sep 19, 2015
1 parent ce12748 commit 606341b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/change_directory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@

dirs = Dir.glob('*')
dirs.each do |dir|
Dir.chdir('reports')
year = dir[0..3]
month = dir[4..5]
day = dir[6..7]
FileUtils.mkdir_p("../attendees/#{year}/#{month}/#{day}/")
dest = "../attendees/#{year}/#{month}/#{day}/"
FileUtils.mkdir_p(dest)

# NOTE コピー元ファイルの中にディレクトリ名が入っている
Dir.chdir(dir)
p Dir.glob("*")
files = Dir.glob("*")
#FileUtils.cp(files, dest)
Dir.chdir('..')
Expand Down

0 comments on commit 606341b

Please sign in to comment.