Thank you much for the tips and suggestions. It is working just like I need it to now.
On Wednesday, October 10, 2012 6:41:27 PM UTC-7, Charles Calvert wrote:
> On Wed, 10 Oct 2012 13:04:35 -0700 (PDT), crossan
...@gmail.com wrote
> in <f5075c06-b7f2-4cd3-a40c-906547bdc120@googlegroups.com>:
> > Below is my script which create me a html file called pickle.html
> > and then when ran again, it checks if exists and if so appends to
> > the file and creates new one.
> > I need to tell the script where I want to the html file to go to.
> > I run this from the working directory and in the same directory is
> > a folder called 'logs' so I would like all the pickle.html files
> > to go to logs.
> [snip]
> >require 'date'
> >file, new_file = 'pickle.html', DateTime.now.strftime('%s')
> How about:
> file, new_file = 'logs/pickle.html', DateTime.now.strftime('%s')
> >if File.exists?('file')
> Why are you enclosing file in quotation marks? That's a string
> literal, not a variable name.
> > File.rename('file', "pickle_#{new_file}.html")
> File.rename(file, "logs/pickle_#{new_file}.html")
> [snip rest]
> --
> Charles Calvert | Websites
> Celtic Wolf, Inc. | Web Applications
> http://www.celticwolf.com/ | Software
> (703) 580-0210 | Databases