Ani
Thu Jun 08 23:26:25 CDT 2006
Thanks Richard.
That worked!!!
Richard Mueller wrote:
> Hi,
>
> Just to clarify:
>
> sFolder = oFileSystem.GetSpecialFolder(2)
>
> is equivalent to:
>
> sFolder = oFileSystem.GetSpecialFolder(2).Path
>
> I would use:
>
> Set oFolder = oFileSystem.GetSpecialFolder(2)
> Response.Write(oFolder.Path)
>
> --
> Richard
> Microsoft MVP Scripting and ADSI
> Hilltop Lab -
http://www.rlmueller.net
>
> "mayayana" <mayaXXyana1a@mindXXspring.com> wrote in message
> news:mCVhg.3202$lf4.2148@newsread1.news.pas.earthlink.net...
> > Skip the "Set". If you just use:
> >
> > sFolder = oFileSystem.GetSpecialFolder(2)
> >
> > you'll get the path string. If you want to use the object
> > approach you need to use the Path property of the
> > folder object to get the string.
> >
> > (It's a bit confusing. I think the reason it works both
> > ways is because the path is considered the "default"
> > property of the object.)
> >
> >>
> >> I have the following code to get the folder path:
> >>
> >> Set oFileSystem =Server.CreateObject("Scripting.FileSystemObject")
> >> Set tfolder = oFileSystem.GetSpecialFolder(2)
> >>
> >> Response.Write(tfolder) will display as C:\windows\Temp
> >>
> >> Now I need to get a substring of this result. I cannot use any string
> >> functions as it is giving an error.
> >>
> >> Any ideas?
> >>
> >> Thanks,
> >> Anishya
> >>
> >
> >