From: Gary Wright Date: 2011-12-31T14:55:16+09:00 Subject: Re: output file from variable On Dec 30, 2011, at 8:31 PM, Alex Sweps wrote: > Thank you very much for the reply but for your solution to work i would > need the file name of the original file being read. I am inputing my > file via ARGV[0] so i cannot specify the original filename. Seeing as > the variable x contains the entire file is there a way i can output x > into a new file and name the file with a variable? > I simply want a way to rename the input file :( ARGV[0] *is* the name of the original file so: File.rename(ARGV[0], new_filename) should work. Gary Wright