Removing only child directories

i want to delete only child dierectoris, but i am getting a code its deleting parent directory also

I think you are looking for Dir.children

https://ruby-doc.org/core-2.5.0/Dir.html#method-c-children

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs