Kindly note that I am student and I need some help understanding some
I am trying to do the following:
1- create a script that accept a command line directory name
2- check whether the directory exists (if yes, I will ask the user to
confirm if he likes to use the existing directory)
3- create directories and sub-directories using the DATA object that
reads the structure after the END
let’s forget about step#2 for now.
This is my script:
puts “__________________________________________ _ "
puts " "
puts “USAGE: ruby script/generate.rb Your_Site_Name”
puts "_________________________________________ _ _”
#Process the data that follows END and create directories
puts “This directory already exist!”
puts “Would you like to use the existing directory (Y/N)?”
DATA.each do |line|
I executed my script on Linus server and it worked without any error BUT
when I try to delete the main directory (ARGV) from the server, it
says: no such file or directory, the same problem happens when I try to
delete any of the sub-directories.
I am using FTP software that I always use for my file uploads and
I would like to know if this is the right way to create the directory
thank you SO MUCH