I've been learning a bit of scripting and picked a task deleting a file.
So I read a bit and search the net a bit. I came up with an example:
www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1102.mspx
which shows
Const TEMPORARY_INTERNET_FILES = &H20&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path & "\*.*"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(strPath)
I wanted to modify this a bit so I change the strPath line
strPath = objFolderItem.Path & "\triggerParams.js"
but this fails with an 800A0035 error.
I have checked that the file is in the folder, changing the
script to just enumerate the filenames in the folder finds it:
For each file in objFolder.Items
MsgBox "Found: " & file.name
next
Can anyone see something I've made a mistake doing?
Thanks