Profile-independent directory specification for NT?

(Moran, Craig M (BAH)) #1

My bad. I did #ENV{ instead of #{ENV. It behaves correctly now. I
appreciate the explanation.


-----Original Message-----
From: Austin Ziegler []
Sent: Wednesday, February 25, 2004 12:27 PM
Subject: Re: Profile-independent directory specification for NT?

On Thu, 26 Feb 2004 01:38:25 +0900, Moran, Craig M (BAH) wrote:

Thanks! This works perfectly. However, Austin’s solution does not. I’d
imagine it was a misplaced quote. Is either style preferable over the
other? Craig

I just tried my version in Windows XP with irb and it produced the exact

With the version provided by Jim Bob, you get a string, create a string, and

then add them to a new string. With mine, you’re only creating one string

irb(main):030:0> profile_path = “#{ENV[‘USERPROFILE’]}\My Documents\”
=> “C:\Documents and Settings\Austin\My Documents\”


austin ziegler * * Toronto, ON, Canada
software designer * pragmatic programmer * 2004.02.25
* 12.21.29