Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby change directory

Dir.chdir "directory"

# Usage with a block
Dir.chdir "directory" do
  # block run inside "directory"
  puts Dir.pwd
end
# cwd is unaffected afterwards
puts Dir.pwd
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ruby #change #directory
ADD COMMENT
Topic
Name
4+3 =