View Single Post
Old 01-12-2007   #2 (permalink)
Marcel J. Ortiz [MSFT]


 
 

Re: Override FileSystem Provider's Treatment of Tilde

The ~ is resolved by providers to their home location. Each provider can
have its own home location which you can view like this:

PS>get-psprovider | ft Name, Home

Name Home
---- ----
Alias
Environment
FileSystem C:\Documents and
Settings\mosoto
Function
Registry
Variable
Certificate


PS>

To change the provider home location just do:

PS>$provider = get-psprovider filesystem # or another provider name
PS>$provider.Home
C:\Documents and Settings\mosoto
PS>$provider.Home = 'c:\'
PS>cd ~; get-location

Path
----
C:\


PS>




"Tom G." <thomglow@lycos.com> wrote in message
news:%23rzclJlNHHA.4916@TK2MSFTNGP06.phx.gbl...
> Is there some way to override how the filesystem provider treats the
> tilde (~) character? I would like to change the path that ~ resolves
> to. I thought that maybe it corresponded to the $home constant, but it
> does not.
>
> Tom G.
>
> --
>



My System SpecsSystem Spec