- trying to standardize on a naming convention for all of my
- new structure should be all lower-case with hyphphens for spaces
- Using windows, I am running the following:
next if d =~ /[a-z]+.[a-z]+/
next if d == “.” or d == “…”
newfile = d.gsub(/\W/, “-”)
so I want:
to change to
Which works fine on the top level, but is not recursing down to the next
level. Filenames should be ignored.
I’ve tried playing with various methods on the Dir class (entries,
Using Dir[/] is throwing up saying that it can’t rename (no surprise
since it can’t rename without an absolute path, I guess).
Please help thanks!