OK lets start over, how would you do this script?
set WshShell = WScript.CreateObject("WScript.Shell")
dFolder = WshShell.ExpandEnvironmentStrings("%UserProfile%") & _
Set fso = CreateObject("Scripting.FileSystemObject")
Set Fldr = fso.GetFolder(dFolder)
For each file in Fldr.files
If Ucase(Left(File.Name, 6)) = "COOKIE" Then
"Stefan Kanthak" <email@example.com> wrote in message
> "Todd Vargo" <tlvargo@xxxxxx> wrote:
> Your address is wrong!
> [ very clumsy way to get the cookie jar ]
>> You have to use ExpandEnvironmentStrings method to retrieve %UserProfile%
>> from the environment.
>> Try this...
>> set WshShell = WScript.CreateObject("WScript.Shell")
>> dFolder = WshShell.ExpandEnvironmentStrings("%UserProfile%") & _
> That's clumsy too!
> And on Vista AFAIK %LocalAppData% has been introduced, so it is
> advisable to use that environment variable in REAL batch scripts.
> is THE on and only way to retrieve the location of the current users
> cookie folder on all versions and all languages of Windows.