Question : RUBY CHANGE DIRECTORY

Hello
I am brand new to ruby and was wondering how I can open a file in a different directory.
My current script (Phil.rb) reads as follows and is in the same directory as my text file (SC6.TXT).

File.open("SC6.TXT").each {  | line | puts line}

lets say the my SC6.TXT file was in another directory such as - F:\Phil\Ruby\SC6.TXT
What would be the change in my script to open my text file in F drive?

Thanks
Phil

Answer : RUBY CHANGE DIRECTORY

File.open("F:\Phil\Ruby\SC6.TXT")
works just fine
Random Solutions  
 
programming4us programming4us