I have to download files from the web over several requests. The
downloaded files for each request have to be put in a folder with the
same name as the request number.
For example:
My script is now running to download files for request number 87665. So
all the downloaded files are to be put in the destination folder Current
Download\Attachment87665. So how do I do that?
Destination folder: Current Download is fixed. only need to create
Attachmentxxxxxx dynamically, where xxxxxx any request number.
This is Python version of code: but I want it in a Ruby, just for your
reference to understand what I am looking for
request_number = 82673
base dir
_dir = “D:\Current Download”
create dynamic name, like “D:\Current Download\Attachment82673”
My script is now running to download files for request number 87665. So
all the downloaded files are to be put in the destination folder Current
Download\Attachment87665. So how do I do that?
Function FileUtils#mkdir_p makes sure that all intermediate
directories are created when creating a path.
My script is now running to download files for request number 87665. So
all the downloaded files are to be put in the destination folder Current
Download\Attachment87665. So how do I do that?
Function FileUtils#mkdir_p makes sure that all intermediate
directories are created when creating a path.
Carlo
Can I have a simple snippet for that, I am totally new to Ruby. I have
Ruby 1.9.3 installed in my PC(windows 7)
have you watched my Python snippet? Look at that how it is
concatenating and checking if that file exist or not? then dynamically
creating the folders with that name.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.